From 646c57cf7e90e77bd72a1756a7aacef649cc8226 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 29 May 2023 11:20:40 -0700 Subject: [PATCH] v3 fix operation overloads (#176) * Fixes SerializedRequestBody['fields'] type * Updates ApiCLient fields type * Fixes fields type, moves RequestField into rest, fixes _get_headers * Fixes _get_used_path * Updates x_params to default to None * When x_params are required, none is not an allowed value * Moves required x_params earlier than optional ones * tweaks skip_deserilization * Adds new template for required variables * Updated templates * Simplifies operation overloads * Reorders required and optional parameters * Writes content_type on one line if there is only one * Adds generic types to request bodies * Adds generic types to request bodies * Fixes test_fake_api errors * Fixes inputs to RequestField * FIxes new signature for arays, adds newlines * Updates required properties to use newlines * Adds newlines to new optional properties * Uses newlines in additionalProperties new signature * Moves array with usages higher * Adds new arry ref generic types * Adds array generics in new * Input arg in new for more than one type uses newline * Adds newline to new anytype types * Adds parameterization to reuired ref properties in schema new * Adds required prop generic types when from properties * Adds required prop from additional prop generic types * Adds helper for new property type hints * Adds AnyTypeSchema parameterization * Adds new ref generic helper * Adds new optional property ref generic types * Adds kwarg generics when set * Changes new list/tuple input into sequence * Adds newlines to kwargs in new signature * Adds typing.Sequence for ListSchema inputs * Tweaks operation type hint, sets ApiResponseWithoutDeserialization body + headers always as unset * Regenerates samples --- .../codegen/model/CodegenOperation.java | 52 ++ .../src/main/resources/python/api_client.hbs | 56 +- .../main/resources/python/api_response.hbs | 4 +- .../request_bodies/request_body.hbs | 2 +- .../python/components/schemas/_helper_new.hbs | 74 ++- .../_helper_new_property_value_type.hbs | 17 + .../_helper_new_ref_property_value_type.hbs | 19 + .../_helper_types_all_incl_schema_newline.hbs | 17 + .../path/verb/_helper_operation_args.hbs | 80 +-- .../verb/_helper_operation_args_optional.hbs | 51 ++ .../_helper_operation_args_request_body.hbs | 223 ------- .../verb/_helper_operation_args_required.hbs | 41 ++ .../python/paths/path/verb/operation.hbs | 30 +- .../src/main/resources/python/rest.hbs | 21 +- .../src/main/resources/python/schemas.hbs | 4 +- .../python/src/unit_test_api/api_client.py | 56 +- .../python/src/unit_test_api/api_response.py | 4 +- .../unit_test_api/components/schema/_not.py | 39 +- ...s_allows_a_schema_which_should_validate.py | 65 +- ...tionalproperties_are_allowed_by_default.py | 99 ++- ...dditionalproperties_can_exist_by_itself.py | 5 +- ...operties_should_not_look_in_applicators.py | 93 ++- .../unit_test_api/components/schema/allof.py | 117 +++- .../schema/allof_combined_with_anyof_oneof.py | 156 ++++- .../components/schema/allof_simple_types.py | 117 +++- .../schema/allof_with_base_schema.py | 117 +++- .../schema/allof_with_one_empty_schema.py | 39 +- .../allof_with_the_first_empty_schema.py | 39 +- .../allof_with_the_last_empty_schema.py | 39 +- .../schema/allof_with_two_empty_schemas.py | 39 +- .../unit_test_api/components/schema/anyof.py | 78 ++- .../components/schema/anyof_complex_types.py | 117 +++- .../schema/anyof_with_base_schema.py | 78 ++- .../schema/anyof_with_one_empty_schema.py | 39 +- .../schema/array_type_matches_arrays.py | 36 +- .../unit_test_api/components/schema/by_int.py | 39 +- .../components/schema/by_number.py | 39 +- .../components/schema/by_small_number.py | 39 +- .../components/schema/date_time_format.py | 39 +- .../components/schema/email_format.py | 39 +- .../components/schema/enums_in_properties.py | 31 +- .../components/schema/forbidden_property.py | 69 ++- .../components/schema/hostname_format.py | 39 +- .../invalid_string_value_for_default.py | 45 +- .../components/schema/ipv4_format.py | 39 +- .../components/schema/ipv6_format.py | 39 +- .../components/schema/json_pointer_format.py | 39 +- .../components/schema/maximum_validation.py | 39 +- ...aximum_validation_with_unsigned_integer.py | 39 +- .../components/schema/maxitems_validation.py | 39 +- .../components/schema/maxlength_validation.py | 39 +- ...axproperties0_means_the_object_is_empty.py | 39 +- .../schema/maxproperties_validation.py | 39 +- .../components/schema/minimum_validation.py | 39 +- .../minimum_validation_with_signed_integer.py | 39 +- .../components/schema/minitems_validation.py | 39 +- .../components/schema/minlength_validation.py | 39 +- .../schema/minproperties_validation.py | 39 +- ...ted_allof_to_check_validation_semantics.py | 78 ++- ...ted_anyof_to_check_validation_semantics.py | 78 ++- .../components/schema/nested_items.py | 53 +- ...ted_oneof_to_check_validation_semantics.py | 78 ++- .../schema/not_more_complex_schema.py | 65 +- .../schema/object_properties_validation.py | 52 +- .../unit_test_api/components/schema/oneof.py | 78 ++- .../components/schema/oneof_complex_types.py | 117 +++- .../schema/oneof_with_base_schema.py | 78 ++- .../schema/oneof_with_empty_schema.py | 39 +- .../components/schema/oneof_with_required.py | 98 ++- .../schema/pattern_is_not_anchored.py | 39 +- .../components/schema/pattern_validation.py | 39 +- .../properties_with_escaped_characters.py | 39 +- ...perty_named_ref_that_is_not_a_reference.py | 39 +- .../schema/ref_in_additionalproperties.py | 29 +- .../components/schema/ref_in_allof.py | 39 +- .../components/schema/ref_in_anyof.py | 39 +- .../components/schema/ref_in_items.py | 36 +- .../components/schema/ref_in_not.py | 39 +- .../components/schema/ref_in_oneof.py | 39 +- .../components/schema/ref_in_property.py | 69 ++- .../schema/required_default_validation.py | 69 ++- .../components/schema/required_validation.py | 69 ++- .../schema/required_with_empty_array.py | 69 ++- .../required_with_escaped_characters.py | 39 +- ..._do_anything_if_the_property_is_missing.py | 28 +- .../schema/uniqueitems_false_validation.py | 39 +- .../schema/uniqueitems_validation.py | 39 +- .../components/schema/uri_format.py | 39 +- .../components/schema/uri_reference_format.py | 39 +- .../components/schema/uri_template_format.py | 39 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 67 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 67 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 67 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 67 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 145 ++--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../post/operation.py | 26 +- .../python/src/unit_test_api/rest.py | 21 +- .../python/src/unit_test_api/schemas.py | 4 +- .../python/src/this_package/api_client.py | 56 +- .../python/src/this_package/api_response.py | 4 +- .../components/schema/addition_operator.py | 19 +- .../components/schema/operator.py | 39 +- .../components/schema/subtraction_operator.py | 19 +- .../paths/operators/post/operation.py | 83 +-- .../operators/post/request_body/__init__.py | 11 +- .../python/src/this_package/rest.py | 21 +- .../python/src/this_package/schemas.py | 4 +- .../python/src/this_package/api_client.py | 56 +- .../python/src/this_package/api_response.py | 4 +- .../get/operation.py | 25 +- .../get/operation.py | 26 +- .../get/operation.py | 26 +- .../get/operation.py | 26 +- .../security/python/src/this_package/rest.py | 21 +- .../python/src/this_package/schemas.py | 4 +- .../python/src/petstore_api/api_client.py | 56 +- .../python/src/petstore_api/api_response.py | 4 +- .../request_body_client/__init__.py | 2 +- .../request_body_pet/__init__.py | 4 +- .../request_body_user_array/__init__.py | 2 +- .../content/application_json/schema.py | 13 +- .../content/application_json/schema.py | 6 +- .../content/application_json/schema.py | 13 +- .../content/application_xml/schema.py | 13 +- .../components/schema/_200_response.py | 46 +- .../petstore_api/components/schema/_return.py | 39 +- .../schema/abstract_step_message.py | 83 ++- .../schema/additional_properties_class.py | 149 ++++- .../schema/additional_properties_validator.py | 185 +++++- ...ditional_properties_with_array_of_enums.py | 18 +- .../petstore_api/components/schema/address.py | 6 +- .../petstore_api/components/schema/animal.py | 31 +- .../components/schema/animal_farm.py | 13 +- .../components/schema/any_type_and_format.py | 581 +++++++++++++++++- .../components/schema/any_type_not_string.py | 39 +- .../components/schema/api_response.py | 39 +- .../petstore_api/components/schema/apple.py | 32 +- .../components/schema/apple_req.py | 11 +- .../schema/array_holding_any_type.py | 36 +- .../schema/array_of_array_of_number_only.py | 54 +- .../components/schema/array_of_enums.py | 16 +- .../components/schema/array_of_number_only.py | 41 +- .../components/schema/array_test.py | 105 ++-- .../schema/array_with_validations_in_items.py | 13 +- .../petstore_api/components/schema/banana.py | 27 +- .../components/schema/banana_req.py | 13 +- .../components/schema/basque_pig.py | 25 +- .../components/schema/capitalization.py | 56 +- .../src/petstore_api/components/schema/cat.py | 65 +- .../components/schema/category.py | 32 +- .../components/schema/child_cat.py | 65 +- .../components/schema/class_model.py | 45 +- .../petstore_api/components/schema/client.py | 26 +- .../schema/complex_quadrilateral.py | 65 +- ...d_any_of_different_types_no_validations.py | 75 ++- .../components/schema/composed_array.py | 36 +- .../components/schema/composed_object.py | 20 +- .../schema/composed_one_of_different_types.py | 95 ++- .../components/schema/danish_pig.py | 25 +- .../src/petstore_api/components/schema/dog.py | 65 +- .../petstore_api/components/schema/drawing.py | 162 ++++- .../components/schema/enum_arrays.py | 45 +- .../components/schema/enum_test.py | 83 ++- .../components/schema/equilateral_triangle.py | 65 +- .../petstore_api/components/schema/file.py | 26 +- .../schema/file_schema_test_class.py | 47 +- .../src/petstore_api/components/schema/foo.py | 26 +- .../components/schema/format_test.py | 169 ++++- .../components/schema/from_schema.py | 33 +- .../petstore_api/components/schema/fruit.py | 45 +- .../components/schema/fruit_req.py | 39 +- .../components/schema/gm_fruit.py | 45 +- .../components/schema/grandparent_animal.py | 25 +- .../components/schema/has_only_read_only.py | 32 +- .../components/schema/health_check_result.py | 35 +- .../components/schema/isosceles_triangle.py | 65 +- .../petstore_api/components/schema/items.py | 13 +- .../components/schema/json_patch_request.py | 75 ++- .../json_patch_request_add_replace_test.py | 39 +- .../schema/json_patch_request_move_copy.py | 10 +- .../schema/json_patch_request_remove.py | 10 +- .../petstore_api/components/schema/mammal.py | 39 +- .../components/schema/map_test.py | 69 ++- ...perties_and_additional_properties_class.py | 47 +- .../petstore_api/components/schema/money.py | 30 +- .../petstore_api/components/schema/name.py | 46 +- .../schema/no_additional_properties.py | 13 +- .../components/schema/nullable_class.py | 365 +++++++++-- .../components/schema/nullable_shape.py | 39 +- .../components/schema/nullable_string.py | 5 +- .../components/schema/number_only.py | 28 +- .../schema/obj_with_required_props.py | 25 +- .../schema/obj_with_required_props_base.py | 25 +- ...ject_model_with_arg_and_args_properties.py | 30 +- .../schema/object_model_with_ref_props.py | 40 +- ..._with_req_test_prop_from_unset_add_prop.py | 88 ++- .../object_with_colliding_properties.py | 34 +- .../schema/object_with_decimal_properties.py | 39 +- .../object_with_difficultly_named_props.py | 20 +- ...object_with_inline_composition_property.py | 89 ++- ...ect_with_invalid_named_refed_properties.py | 20 +- .../schema/object_with_optional_test_prop.py | 26 +- .../schema/object_with_validations.py | 20 +- .../petstore_api/components/schema/order.py | 60 +- .../components/schema/parent_pet.py | 20 +- .../src/petstore_api/components/schema/pet.py | 83 ++- .../src/petstore_api/components/schema/pig.py | 39 +- .../petstore_api/components/schema/player.py | 33 +- .../components/schema/quadrilateral.py | 39 +- .../schema/quadrilateral_interface.py | 39 +- .../components/schema/read_only_first.py | 32 +- .../req_props_from_explicit_add_props.py | 10 +- .../schema/req_props_from_true_add_props.py | 58 +- .../schema/req_props_from_unset_add_props.py | 49 +- .../components/schema/scalene_triangle.py | 65 +- .../schema/self_referencing_array_model.py | 13 +- .../schema/self_referencing_object_model.py | 13 +- .../petstore_api/components/schema/shape.py | 39 +- .../components/schema/shape_or_null.py | 39 +- .../components/schema/simple_quadrilateral.py | 65 +- .../components/schema/some_object.py | 39 +- .../components/schema/special_model_name.py | 26 +- .../components/schema/string_boolean_map.py | 5 +- .../components/schema/string_enum.py | 5 +- .../src/petstore_api/components/schema/tag.py | 33 +- .../components/schema/triangle.py | 39 +- .../components/schema/triangle_interface.py | 39 +- .../petstore_api/components/schema/user.py | 243 +++++++- .../petstore_api/components/schema/whale.py | 37 +- .../petstore_api/components/schema/zebra.py | 40 +- .../another_fake_dummy/patch/operation.py | 55 +- .../paths/fake/delete/operation.py | 40 +- .../petstore_api/paths/fake/get/operation.py | 73 +-- .../fake/get/parameters/parameter_0/schema.py | 12 +- .../fake/get/parameters/parameter_2/schema.py | 12 +- .../paths/fake/get/request_body/__init__.py | 2 +- .../schema.py | 45 +- .../paths/fake/patch/operation.py | 55 +- .../petstore_api/paths/fake/post/operation.py | 57 +- .../paths/fake/post/request_body/__init__.py | 2 +- .../schema.py | 105 +++- .../get/operation.py | 57 +- .../get/request_body/__init__.py | 2 +- .../put/operation.py | 61 +- .../put/request_body/__init__.py | 2 +- .../put/operation.py | 69 +-- .../put/request_body/__init__.py | 2 +- .../put/operation.py | 32 +- .../fake_classname_test/patch/operation.py | 57 +- .../fake_delete_coffee_id/delete/operation.py | 33 +- .../paths/fake_health/get/operation.py | 26 +- .../post/operation.py | 61 +- .../post/request_body/__init__.py | 2 +- .../content/application_json/schema.py | 5 +- .../fake_inline_composition/post/operation.py | 121 +--- .../post/parameters/parameter_0/schema.py | 39 +- .../post/parameters/parameter_1/schema.py | 89 ++- .../post/request_body/__init__.py | 13 +- .../content/application_json/schema.py | 39 +- .../content/multipart_form_data/schema.py | 89 ++- .../content/application_json/schema.py | 39 +- .../content/multipart_form_data/schema.py | 89 ++- .../fake_json_form_data/get/operation.py | 55 +- .../get/request_body/__init__.py | 2 +- .../schema.py | 30 +- .../paths/fake_json_patch/patch/operation.py | 55 +- .../patch/request_body/__init__.py | 2 +- .../fake_json_with_charset/post/operation.py | 85 +-- .../post/request_body/__init__.py | 11 +- .../get/operation.py | 27 +- .../fake_multiple_securities/get/operation.py | 27 +- .../paths/fake_obj_in_query/get/operation.py | 32 +- .../get/parameters/parameter_0/schema.py | 26 +- .../post/operation.py | 117 +--- .../post/request_body/__init__.py | 11 +- .../post/operation.py | 67 +- .../post/request_body/__init__.py | 2 +- .../content/multipart_form_data/schema.py | 33 +- .../get/operation.py | 33 +- .../paths/fake_redirection/get/operation.py | 26 +- .../fake_ref_obj_in_query/get/operation.py | 32 +- .../post/operation.py | 57 +- .../post/request_body/__init__.py | 2 +- .../fake_refs_arraymodel/post/operation.py | 57 +- .../post/request_body/__init__.py | 2 +- .../paths/fake_refs_boolean/post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 85 +-- .../post/request_body/__init__.py | 11 +- .../paths/fake_refs_enum/post/operation.py | 57 +- .../post/request_body/__init__.py | 5 +- .../paths/fake_refs_mammal/post/operation.py | 147 ++--- .../post/request_body/__init__.py | 11 +- .../paths/fake_refs_number/post/operation.py | 59 +- .../post/request_body/__init__.py | 2 +- .../post/operation.py | 57 +- .../post/request_body/__init__.py | 2 +- .../paths/fake_refs_string/post/operation.py | 55 +- .../post/request_body/__init__.py | 2 +- .../get/operation.py | 26 +- .../put/operation.py | 32 +- .../put/parameters/parameter_0/schema.py | 12 +- .../put/parameters/parameter_1/schema.py | 12 +- .../put/parameters/parameter_2/schema.py | 12 +- .../put/parameters/parameter_3/schema.py | 12 +- .../put/parameters/parameter_4/schema.py | 12 +- .../post/operation.py | 69 +-- .../post/request_body/__init__.py | 2 +- .../paths/fake_upload_file/post/operation.py | 57 +- .../post/request_body/__init__.py | 2 +- .../content/multipart_form_data/schema.py | 33 +- .../paths/fake_upload_files/post/operation.py | 57 +- .../post/request_body/__init__.py | 2 +- .../content/multipart_form_data/schema.py | 41 +- .../fake_wild_card_responses/get/operation.py | 28 +- .../petstore_api/paths/foo/get/operation.py | 19 +- .../content/application_json/schema.py | 27 +- .../petstore_api/paths/pet/post/operation.py | 81 +-- .../petstore_api/paths/pet/put/operation.py | 78 +-- .../paths/pet_find_by_status/get/operation.py | 34 +- .../get/parameters/parameter_0/schema.py | 12 +- .../paths/pet_find_by_tags/get/operation.py | 33 +- .../get/parameters/parameter_0/schema.py | 12 +- .../paths/pet_pet_id/delete/operation.py | 39 +- .../paths/pet_pet_id/get/operation.py | 34 +- .../paths/pet_pet_id/post/operation.py | 63 +- .../pet_pet_id/post/request_body/__init__.py | 2 +- .../schema.py | 32 +- .../pet_pet_id_upload_image/post/operation.py | 67 +- .../post/request_body/__init__.py | 2 +- .../content/multipart_form_data/schema.py | 34 +- .../paths/solidus/get/operation.py | 25 +- .../paths/store_inventory/get/operation.py | 27 +- .../paths/store_order/post/operation.py | 63 +- .../store_order/post/request_body/__init__.py | 2 +- .../store_order_order_id/delete/operation.py | 31 +- .../store_order_order_id/get/operation.py | 33 +- .../petstore_api/paths/user/post/operation.py | 54 +- .../paths/user/post/request_body/__init__.py | 2 +- .../user_create_with_array/post/operation.py | 46 +- .../user_create_with_list/post/operation.py | 46 +- .../paths/user_login/get/operation.py | 33 +- .../paths/user_logout/get/operation.py | 18 +- .../paths/user_username/delete/operation.py | 32 +- .../paths/user_username/get/operation.py | 33 +- .../paths/user_username/put/operation.py | 67 +- .../put/request_body/__init__.py | 2 +- .../petstore/python/src/petstore_api/rest.py | 21 +- .../python/src/petstore_api/schemas.py | 4 +- .../petstore/python/tests_manual/__init__.py | 8 +- .../python/tests_manual/test_fake_api.py | 52 +- .../python/tests_manual/test_request_body.py | 18 +- 607 files changed, 15583 insertions(+), 13216 deletions(-) create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new_property_value_type.hbs create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new_ref_property_value_type.hbs create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_types_all_incl_schema_newline.hbs create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_optional.hbs delete mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_request_body.hbs create mode 100644 modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_required.hbs diff --git a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenOperation.java b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenOperation.java index 0067bdd9b51..8616083aaeb 100644 --- a/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenOperation.java +++ b/modules/openapi-json-schema-generator/src/main/java/org/openapijsonschematools/codegen/model/CodegenOperation.java @@ -32,9 +32,13 @@ public class CodegenOperation { public final CodegenRequestBody requestBody; public final List allParams; public final List pathParams; + public final boolean hasRequiredPathParams; public final List queryParams; + public final boolean hasRequiredQueryParams; public final List headerParams; + public final boolean hasRequiredHeaderParams; public final List cookieParams; + public final boolean hasRequiredCookieParams; public final boolean hasRequiredParamOrBody; public final boolean hasOptionalParamOrBody; public final List> security; @@ -61,9 +65,57 @@ public CodegenOperation(Boolean deprecated, boolean hasErrorResponseObject, Stri this.requestBody = requestBody; this.allParams = allParams; this.pathParams = pathParams; + if (pathParams == null) { + this.hasRequiredPathParams = false; + } else { + boolean val = false; + for (CodegenParameter p: pathParams) { + if (Boolean.TRUE.equals(p.required)) { + val = true; + break; + } + } + this.hasRequiredPathParams = val; + } this.queryParams = queryParams; + if (queryParams == null) { + this.hasRequiredQueryParams = false; + } else { + boolean val = false; + for (CodegenParameter p: queryParams) { + if (Boolean.TRUE.equals(p.required)) { + val = true; + break; + } + } + this.hasRequiredQueryParams = val; + } this.headerParams = headerParams; + if (headerParams == null) { + this.hasRequiredHeaderParams = false; + } else { + boolean val = false; + for (CodegenParameter p: headerParams) { + if (Boolean.TRUE.equals(p.required)) { + val = true; + break; + } + } + this.hasRequiredHeaderParams = val; + } this.cookieParams = cookieParams; + if (cookieParams == null) { + this.hasRequiredCookieParams = false; + } else { + boolean val = false; + for (CodegenParameter p: cookieParams) { + if (Boolean.TRUE.equals(p.required)) { + val = true; + break; + } + } + this.hasRequiredCookieParams = val; + } this.hasRequiredParamOrBody = hasRequiredParamOrBody; this.hasOptionalParamOrBody = hasOptionalParamOrBody; this.security = security; diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs index 29929e7003b..097dd580ea9 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_client.hbs @@ -29,13 +29,6 @@ from {{packageName}} import exceptions, rest, schemas, security_schemes, api_res from {{packageName}}.configurations import api_configuration, schema_configuration as schema_configuration_ -class RequestField(fields.RequestField): - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - class JSONEncoder(json.JSONEncoder): compact_separators = (',', ':') @@ -771,7 +764,10 @@ class HeaderParameter(__HeaderParameterBase): class TypedDictInputVerifier: @staticmethod - def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict], data: typing.Mapping[str, typing.Any]): + def _verify_typed_dict_inputs( + tdict_cls: typing.Type[typing_extensions.TypedDict], + data: typing.Optional[typing.Mapping[str, typing.Any]] + ): """ Ensures that: - required keys are present @@ -782,7 +778,7 @@ class TypedDictInputVerifier: missing_required_keys = [] required_keys_with_unset_values = [] for required_key in tdict_cls.__required_keys__: - if required_key not in data: + if data is None or required_key not in data: missing_required_keys.append(required_key) continue value = data[required_key] @@ -802,10 +798,11 @@ class TypedDictInputVerifier: ) disallowed_additional_keys = [] - for key in data: - if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) + if data is not None: + for key in data: + if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) if disallowed_additional_keys: raise exceptions.ApiTypeError( '{} got {} unexpected keyword arguments: {}'.format( @@ -1020,7 +1017,7 @@ class ApiClient: host: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1090,7 +1087,7 @@ class ApiClient: method: str, url: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, body: typing.Union[str, bytes, None] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1189,9 +1186,9 @@ class Api(TypedDictInputVerifier): def _get_used_path( used_path: str, path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + path_params: typing.Optional[typing_extensions.TypedDict] = None, query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None + query_params: typing.Optional[typing_extensions.TypedDict] = None ) -> str: used_path_params = {} if path_params is not None: @@ -1199,6 +1196,7 @@ class Api(TypedDictInputVerifier): parameter_data = path_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) used_path_params.update(serialized_data) @@ -1213,6 +1211,7 @@ class Api(TypedDictInputVerifier): continue if prefix_separator_iterator is None: prefix_separator_iterator = parameter.get_prefix_separator_iterator() + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value @@ -1221,7 +1220,7 @@ class Api(TypedDictInputVerifier): @staticmethod def _get_headers( header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + header_params: typing.Optional[typing_extensions.TypedDict] = None, accept_content_types: typing.Tuple[str, ...] = (), ) -> _collections.HTTPHeaderDict: headers = _collections.HTTPHeaderDict() @@ -1230,6 +1229,7 @@ class Api(TypedDictInputVerifier): parameter_data = header_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) headers.extend(serialized_data) if accept_content_types: @@ -1239,7 +1239,7 @@ class Api(TypedDictInputVerifier): @staticmethod def _get_fields_and_body( - request_body: 'RequestBody', + request_body: typing.Type[RequestBody], body: typing.Any, headers: _collections.HTTPHeaderDict, content_type: str @@ -1271,7 +1271,7 @@ class Api(TypedDictInputVerifier): class SerializedRequestBody(typing_extensions.TypedDict, total=False): body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] + fields: typing.Tuple[rest.RequestField, ...] class RequestBody(StyleFormSerializer, JSONDetector): @@ -1307,24 +1307,24 @@ class RequestBody(StyleFormSerializer, JSONDetector): return {'body': str(in_data)} @classmethod - def __multipart_json_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_json_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: json_value = cls.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) request_field.make_multipart(content_type='application/json') return request_field @classmethod - def __multipart_form_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_form_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: if isinstance(value, str): - request_field = RequestField(name=key, data=str(value)) + request_field = rest.RequestField(name=key, data=str(value)) request_field.make_multipart(content_type='text/plain') elif isinstance(value, bytes): - request_field = RequestField(name=key, data=value) + request_field = rest.RequestField(name=key, data=value) request_field.make_multipart(content_type='application/octet-stream') elif isinstance(value, schemas.FileIO): # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(RequestField, request_field) + request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, request_field) value.close() else: request_field = cls.__multipart_json_item(key=key, value=value) @@ -1353,7 +1353,7 @@ class RequestBody(StyleFormSerializer, JSONDetector): for key, value in in_data.items(): if isinstance(value, tuple): if value: - # values use explode = True, so the code makes a RequestField for each item with name=key + # values use explode = True, so the code makes a rest.RequestField for each item with name=key for item in value: request_field = cls.__multipart_form_item(key=key, value=item) fields.append(request_field) diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/api_response.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/api_response.hbs index 0b2f43eb2e3..0c4c4149966 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/api_response.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/api_response.hbs @@ -20,5 +20,5 @@ class ApiResponse: @dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.Schema] = schemas.unset - headers: typing.Union[schemas.Unset, typing_extensions.TypedDict] = schemas.unset + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/request_bodies/request_body.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/request_bodies/request_body.hbs index 3c80ed12467..c143b79216c 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/request_bodies/request_body.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/request_bodies/request_body.hbs @@ -27,7 +27,7 @@ class {{jsonPathPiece.camelCase}}(api_client.RequestBody): class {{@key.camelCase}}MediaType(api_client.MediaType): {{#with this}} {{#with schema}} - schema: typing.Type[{{../@key.snakeCase}}_{{jsonPathPiece.snakeCase}}.{{jsonPathPiece.camelCase}}] = {{../@key.snakeCase}}_{{jsonPathPiece.snakeCase}}.{{jsonPathPiece.camelCase}} + {{> components/_helper_content_schema_type paramName="schema" modulePrefix=../@key.snakeCase }} {{/with}} {{/with}} {{/each}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs index 69e73067cf2..5f8b5fe0bd9 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new.hbs @@ -3,13 +3,18 @@ def __new__( {{#if types}} {{#eq types.size 1}} {{#contains types "array"}} - arg_: typing.Union[ - typing.Tuple[ - {{#with ../items}}{{#if refInfo.refClass}}typing.Union['{{> components/schemas/_helper_refclass_with_module }}', {{#with getDeepestRef}}{{> _helper_schema_python_types }}{{/with}}]{{else}}typing.Union[Schema_.{{jsonPathPiece.camelCase}}, {{> _helper_schema_python_types }}]{{/if}}{{/with}}, ... - ], - typing.List[ - {{#with ../items}}{{#if refInfo.refClass}}typing.Union['{{> components/schemas/_helper_refclass_with_module }}', {{#with getDeepestRef}}{{> _helper_schema_python_types }}{{/with}}]{{else}}typing.Union[Schema_.{{jsonPathPiece.camelCase}}, {{> _helper_schema_python_types }}]{{/if}}{{/with}} - ], + arg_: typing.Sequence[ + {{#with ../items}} + {{#if refInfo.refClass}} + typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} + ] + {{else}} + typing.Union[ + {{> components/schemas/_helper_new_property_value_type propertyClass=null optional=false }} + ] + {{/if}} + {{/with}} ], {{/contains}} {{#contains types "object"}} @@ -32,13 +37,19 @@ def __new__( {{/contains}} {{else}} {{#contains types "object"}} - *args_: typing.Union[{{> _helper_schema_python_types }}], + *args_: typing.Union[ + {{> _helper_schema_python_types_newline }} + ], {{else}} - arg_: typing.Union[{{> _helper_schema_python_types }}], + arg_: typing.Union[ + {{> _helper_schema_python_types_newline }} + ], {{/contains}} {{/eq}} {{else}} - *args_: typing.Union[{{> _helper_schema_python_types }}], + *args_: typing.Union[ + {{> _helper_schema_python_types_newline }} + ], {{/if}} {{#if types}} {{#eq types.size 1}} @@ -47,16 +58,27 @@ def __new__( {{#if @key.isValid}} {{#with this}} {{#if refInfo.refClass}} - {{@key.original}}: typing.Union['{{> components/schemas/_helper_refclass_with_module }}', {{#with getDeepestRef}}{{> _helper_schema_python_types }}{{/with}}], + {{@key.original}}: typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} + ], {{else}} {{#if jsonPathPiece}} {{#if schemaIsFromAdditionalProperties}} - {{@key.original}}: typing.Union[Schema_.{{jsonPathPiece.camelCase}}, {{> _helper_schema_python_types }}], + {{@key.original}}: typing.Union[ + {{> components/schemas/_helper_new_property_value_type propertyClass=null optional=false }} + ], {{else}} - {{@key.original}}: typing.Union[Schema_.Properties.{{jsonPathPiece.camelCase}}, {{> _helper_schema_python_types }}], + {{@key.original}}: typing.Union[ + {{> components/schemas/_helper_new_property_value_type propertyClass="Properties" optional=false }} + ], {{/if}} {{else}} - {{@key.original}}: typing.Union[schemas.AnyTypeSchema, {{> _helper_schema_python_types }}], + {{@key.original}}: typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} + ]], + {{> _helper_schema_python_types_newline }} + ], {{/if}} {{/if}} {{/with}} @@ -68,9 +90,13 @@ def __new__( {{#each optionalProperties}} {{#if @key.isValid}} {{#if refInfo.refClass}} - {{@key.original}}: typing.Union['{{> components/schemas/_helper_refclass_with_module }}', {{#with getDeepestRef}}{{> _helper_schema_python_types }}{{/with}}, schemas.Unset] = schemas.unset, + {{@key.original}}: typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=true }} + ] = schemas.unset, {{else}} - {{@key.original}}: typing.Union[Schema_.Properties.{{jsonPathPiece.camelCase}}, {{> _helper_schema_python_types }}, schemas.Unset] = schemas.unset, + {{@key.original}}: typing.Union[ + {{> components/schemas/_helper_new_property_value_type propertyClass="Properties" optional=true }} + ] = schemas.unset, {{/if}} {{/if}} {{/each}} @@ -78,17 +104,25 @@ def __new__( {{#with additionalProperties}} {{#unless isBooleanSchemaFalse}} {{#if refInfo.refClass}} - **kwargs: typing.Union['{{> components/schemas/_helper_refclass_with_module }}', {{#with getDeepestRef}}{{> _helper_schema_python_types }}{{/with}}], + **kwargs: typing.Union[ + {{> components/schemas/_helper_new_ref_property_value_type optional=false }} + ], {{else}} - **kwargs: typing.Union[Schema_.{{jsonPathPiece.camelCase}}, {{> _helper_schema_python_types }}], + **kwargs: typing.Union[ + {{> components/schemas/_helper_new_property_value_type propertyClass=null optional=false }} + ], {{/if}} {{/unless}} {{else}} {{#eq types null}} - **kwargs: typing.Union[{{> components/schemas/_helper_types_all_incl_schema_oneline }}], + **kwargs: typing.Union[ + {{> components/schemas/_helper_types_all_incl_schema_newline }} + ], {{else}} {{#contains types "object"}} - **kwargs: typing.Union[{{> components/schemas/_helper_types_all_incl_schema_oneline }}], + **kwargs: typing.Union[ + {{> components/schemas/_helper_types_all_incl_schema_newline }} + ], {{/contains}} {{/eq}} {{/with}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new_property_value_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new_property_value_type.hbs new file mode 100644 index 00000000000..392d4d1c513 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new_property_value_type.hbs @@ -0,0 +1,17 @@ +{{#if types}} + {{#eq types.size 1}} +Schema_.{{#if propertyClass}}{{propertyClass}}.{{/if}}{{jsonPathPiece.camelCase}}[{{> components/schemas/_helper_schema_python_base_types }}], + {{else}} +Schema_.{{#if propertyClass}}{{propertyClass}}.{{/if}}{{jsonPathPiece.camelCase}}[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} +]], + {{/eq}} +{{else}} +Schema_.{{#if propertyClass}}{{propertyClass}}.{{/if}}{{jsonPathPiece.camelCase}}[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} +]], +{{/if}} +{{#if optional}} +schemas.Unset, +{{/if}} +{{> _helper_schema_python_types_newline }} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new_ref_property_value_type.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new_ref_property_value_type.hbs new file mode 100644 index 00000000000..63badb8fd41 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_new_ref_property_value_type.hbs @@ -0,0 +1,19 @@ +{{#with getDeepestRef}} + {{#if types}} + {{#eq types.size 1}} +{{#if ../refInfo.refModule}}{{../refInfo.refModule}}.{{/if}}{{../refInfo.refClass}}[{{> components/schemas/_helper_schema_python_base_types }}], + {{else}} +{{#if ../refInfo.refModule}}{{../refInfo.refModule}}.{{/if}}{{../refInfo.refClass}}[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} +]], + {{/eq}} + {{else}} +{{#if ../refInfo.refModule}}{{../refInfo.refModule}}.{{/if}}{{../refInfo.refClass}}[typing.Union[ + {{> components/schemas/_helper_schema_python_base_types_newline }} +]], + {{/if}} +{{#if optional}} +schemas.Unset, +{{/if}} +{{> _helper_schema_python_types_newline }} +{{/with}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_types_all_incl_schema_newline.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_types_all_incl_schema_newline.hbs new file mode 100644 index 00000000000..a8fb6567b13 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/components/schemas/_helper_types_all_incl_schema_newline.hbs @@ -0,0 +1,17 @@ +dict, +frozendict.frozendict, +list, +tuple, +decimal.Decimal, +float, +int, +str, +datetime.date, +datetime.datetime, +uuid.UUID, +bool, +None, +bytes, +io.FileIO, +io.BufferedReader, +schemas.Schema diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args.hbs index 3cb03a2fa4b..7db5488bddd 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args.hbs @@ -1,24 +1,32 @@ self, + {{> paths/path/verb/_helper_operation_args_required }} + {{> paths/path/verb/_helper_operation_args_optional }} {{#if requestBody}} - {{> paths/path/verb/_helper_operation_args_request_body }} -{{else}} - {{#if isOverload}} - {{#eq skipDeserialization "True"}} - skip_deserialization: typing_extensions.Literal[True], - {{/eq}} - {{/if}} -{{/if}} -{{#if queryParams}} - query_params: RequestQueryParameters.Params = frozendict.frozendict(), -{{/if}} -{{#if headerParams}} - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), -{{/if}} -{{#if pathParams}} - path_params: RequestPathParameters.Params = frozendict.frozendict(), -{{/if}} -{{#if cookieParams}} - cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + {{#with requestBody}} + {{#if refInfo}} + {{#with getDeepestRef}} + {{#eq content.size 1}} + content_type: typing_extensions.Literal[{{#each content}}"{{{@key.original}}}"{{/each}}] = {{#each content}}{{#if @first}}"{{{@key.original}}}"{{/if}}{{/each}}, + {{else}} + content_type: typing_extensions.Literal[ + {{#each content}} + "{{{@key.original}}}", + {{/each}} + ] = {{#each content}}{{#if @first}}"{{{@key.original}}}"{{/if}}{{/each}}, + {{/eq}} + {{/with}} + {{else}} + {{#eq content.size 1}} + content_type: typing_extensions.Literal[{{#each content}}"{{{@key.original}}}"{{/each}}] = {{#each content}}{{#if @first}}"{{{@key.original}}}"{{/if}}{{/each}}, + {{else}} + content_type: typing_extensions.Literal[ + {{#each content}} + "{{{@key.original}}}", + {{/each}} + ] = {{#each content}}{{#if @first}}"{{{@key.original}}}"{{/if}}{{/each}}, + {{/eq}} + {{/if}} + {{/with}} {{/if}} {{#if produces}} accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, @@ -37,32 +45,32 @@ server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - {{#if isOverload}} - {{#eq skipDeserialization "False"}} - skip_deserialization: typing_extensions.Literal[False] = ..., - {{/eq}} - {{#eq skipDeserialization "null"}} - skip_deserialization: bool = ..., - {{/eq}} - {{else}} - skip_deserialization: bool = False, - {{/if}} -{{#eq skipDeserialization "True"}} +{{#if isOverload}} + {{#eq skipDeserialization true}} + skip_deserialization: typing_extensions.Literal[True] = ... + {{/eq}} + {{#eq skipDeserialization false}} + skip_deserialization: typing_extensions.Literal[False] = False + {{/eq}} +{{else}} + skip_deserialization: bool = False +{{/if}} +{{#eq skipDeserialization true}} ) -> api_response.ApiResponseWithoutDeserialization: ... {{/eq}} -{{#eq skipDeserialization "False"}} +{{#eq skipDeserialization false}} ) -> {{#if getAllResponsesAreErrors}}api_response.ApiResponseWithoutDeserialization: ...{{else}}{{#gt getNonErrorResponses.size 1}}typing.Union[ {{> paths/path/verb/_helper_operation_response_type_hint multiple=true }} ]{{else}}{{> paths/path/verb/_helper_operation_response_type_hint multiple=false }}{{/gt}}: ... {{/if}} {{/eq}} -{{#eq skipDeserialization "null"}} -{{#if isOverload}} +{{#eq skipDeserialization null}} + {{#if isOverload}} ) -> typing.Union[ + {{! this is also the False case because False is default }} {{> paths/path/verb/_helper_operation_response_type_hint multiple=true }} - api_response.ApiResponseWithoutDeserialization, ]: ... -{{else}} + {{else}} ): -{{/if}} + {{/if}} {{/eq}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_optional.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_optional.hbs new file mode 100644 index 00000000000..fb92a1b0d63 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_optional.hbs @@ -0,0 +1,51 @@ +{{#if requestBody}} + {{#with requestBody}} + {{#if refInfo}} + {{#with getDeepestRef}} + {{#unless required}} +body: typing.Union[ + {{#each content}} + request_body.{{../../requestBody.jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, + {{/each}} + schemas.Unset, + {{#each getContentSchemas}} + {{> _helper_schema_python_types_newline }} + {{/each}} +] = schemas.unset, + {{/unless}} + {{/with}} + {{else}} + {{#unless required}} +body: typing.Union[ + {{#each content}} + request_body.{{../../requestBody.jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, + {{/each}} + schemas.Unset, + {{#each getContentSchemas}} + {{> _helper_schema_python_types_newline }} + {{/each}} +] = schemas.unset, + {{/unless}} + {{/if}} + {{/with}} +{{/if}} +{{#if pathParams}} + {{#unless hasRequiredPathParams}} +path_params: typing.Optional[RequestPathParameters.Params] = None, + {{/unless}} +{{/if}} +{{#if queryParams}} + {{#unless hasRequiredQueryParams}} +query_params: typing.Optional[RequestQueryParameters.Params] = None, + {{/unless}} +{{/if}} +{{#if headerParams}} + {{#unless hasRequiredHeaderParams}} +header_params: typing.Optional[RequestHeaderParameters.Params] = None, + {{/unless}} +{{/if}} +{{#if cookieParams}} + {{#unless hasRequiredCookieParams}} +cookie_params: typing.Optional[RequestCookieParameters.Params] = None, + {{/unless}} +{{/if}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_request_body.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_request_body.hbs deleted file mode 100644 index 97996de9ca6..00000000000 --- a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_request_body.hbs +++ /dev/null @@ -1,223 +0,0 @@ -{{#if requestBody.refInfo}} -{{! $ref requestBody }} - {{#if requestBody.getDeepestRef.required}} - {{! required }} - {{#with requestBody.getDeepestRef}} - {{#eq ../contentType "null"}} -body: typing.Union[ - {{#each content}} - request_body.{{../../requestBody.jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, - {{/each}} - {{#each getContentSchemas}} - {{> _helper_schema_python_types_newline }} - {{/each}} -], - {{else}} -body: typing.Union[ - {{#each content}} - {{#eq @key.original ../../contentType }} - request_body.{{../../requestBody.jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, - {{#with this.schema.getSelfOrDeepestRef}} - {{> _helper_schema_python_types_newline }} - {{/with}} - {{/eq}} - {{/each}} -], - {{/eq}} - {{/with}} - {{#if isOverload}} - {{#eq skipDeserialization "True"}} -skip_deserialization: typing_extensions.Literal[True], - {{/eq}} - {{#neq contentType "null"}} - {{#with requestBody.getDeepestRef}} - {{#each content}} - {{#eq @key.original ../../contentType}} - {{#if @first}} -content_type: typing_extensions.Literal["{{{@key.original}}}"] = ..., - {{else}} -content_type: typing_extensions.Literal["{{{@key.original}}}"], - {{/if}} - {{/eq}} - {{/each}} - {{/with}} - {{else}} -content_type: str = ..., - {{/neq}} - {{else}} - {{#with requestBody.getDeepestRef}} - {{#each content}} - {{#if @first}} -content_type: str = '{{{@key.original}}}', - {{/if}} - {{/each}} - {{/with}} - {{/if}} - {{else}} - {{! optional }} - {{#if isOverload}} - {{#eq skipDeserialization "True"}} -skip_deserialization: typing_extensions.Literal[True], - {{/eq}} - {{#neq contentType "null"}} - {{#with requestBody.getDeepestRef}} - {{#each content}} - {{#eq @key.original ../../contentType}} - {{#if @first}} -content_type: typing_extensions.Literal["{{{@key.original}}}"] = ..., - {{else}} -content_type: typing_extensions.Literal["{{{@key.original}}}"], - {{/if}} - {{/eq}} - {{/each}} - {{/with}} - {{else}} -content_type: str = ..., - {{/neq}} - {{else}} - {{#with requestBody.getDeepestRef}} - {{#each content}} - {{#if @first}} -content_type: str = '{{{@key.original}}}', - {{/if}} - {{/each}} - {{/with}} - {{/if}} - {{#with requestBody.getDeepestRef}} - {{#eq ../contentType "null"}} -body: typing.Union[ - {{#each content}} - request_body.{{../../requestBody.jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, - {{/each}} - {{#each getContentSchemas}} - schemas.Unset, - {{> _helper_schema_python_types_newline }} - {{/each}} -] = schemas.unset, - {{else}} -body: typing.Union[ - {{#each content}} - {{#eq @key.original ../../contentType }} - request_body.{{../../requestBody.jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, - schemas.Unset, - {{#with this.schema.getSelfOrDeepestRef}} - {{> _helper_schema_python_types_newline }} - {{/with}} - {{/eq}} - {{/each}} -] = schemas.unset, - {{/eq}} - {{/with}} - {{/if}} -{{else}} -{{! inline requestBody }} - {{#if requestBody.required}} - {{! required }} - {{#with requestBody}} - {{#eq ../contentType "null"}} -body: typing.Union[ - {{#each content}} - request_body.{{../jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, - {{/each}} - {{#each getContentSchemas}} - {{> _helper_schema_python_types_newline }} - {{/each}} -], - {{else}} -body: typing.Union[ - {{#each content}} - {{#eq @key.original ../../contentType }} - request_body.{{../jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, - {{#with this.schema.getSelfOrDeepestRef}} - {{> _helper_schema_python_types_newline }} - {{/with}} - {{/eq}} - {{/each}} -], - {{/eq}} - {{/with}} - {{#if isOverload}} - {{#eq skipDeserialization "True"}} -skip_deserialization: typing_extensions.Literal[True], - {{/eq}} - {{#neq contentType "null"}} - {{#with requestBody}} - {{#each content}} - {{#eq @key.original ../../contentType}} - {{#if @first}} -content_type: typing_extensions.Literal["{{{@key.original}}}"] = ..., - {{else}} -content_type: typing_extensions.Literal["{{{@key.original}}}"], - {{/if}} - {{/eq}} - {{/each}} - {{/with}} - {{else}} -content_type: str = ..., - {{/neq}} - {{else}} - {{#with requestBody}} - {{#each content}} - {{#if @first}} -content_type: str = '{{{@key.original}}}', - {{/if}} - {{/each}} - {{/with}} - {{/if}} - {{else}} - {{! optional }} - {{#if isOverload}} - {{#eq skipDeserialization "True"}} -skip_deserialization: typing_extensions.Literal[True], - {{/eq}} - {{#neq contentType "null"}} - {{#with requestBody}} - {{#each content}} - {{#eq @key.original ../../contentType}} - {{#if @first}} -content_type: typing_extensions.Literal["{{{@key.original}}}"] = ..., - {{else}} -content_type: typing_extensions.Literal["{{{@key.original}}}"], - {{/if}} - {{/eq}} - {{/each}} - {{/with}} - {{else}} -content_type: str = ..., - {{/neq}} - {{else}} - {{#with requestBody}} - {{#each content}} - {{#if @first}} -content_type: str = '{{{@key.original}}}', - {{/if}} - {{/each}} - {{/with}} - {{/if}} - {{#with requestBody}} - {{#eq ../contentType "null"}} -body: typing.Union[ - {{#each content}} - request_body.{{../jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, - {{/each}} - schemas.Unset, - {{#each getContentSchemas}} - {{> _helper_schema_python_types_newline }} - {{/each}} -] = schemas.unset, - {{else}} -body: typing.Union[ - {{#each content}} - {{#eq @key.original ../../contentType }} - request_body.{{../jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, - schemas.Unset, - {{#with this.schema.getSelfOrDeepestRef}} - {{> _helper_schema_python_types_newline }} - {{/with}} - {{/eq}} - {{/each}} -] = schemas.unset, - {{/eq}} - {{/with}} - {{/if}} -{{/if}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_required.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_required.hbs new file mode 100644 index 00000000000..243cc638823 --- /dev/null +++ b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/_helper_operation_args_required.hbs @@ -0,0 +1,41 @@ +{{#if requestBody}} + {{#with requestBody}} + {{#if refInfo}} + {{#with getDeepestRef}} + {{#if required}} +body: typing.Union[ + {{#each content}} + request_body.{{../../requestBody.jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, + {{/each}} + {{#each getContentSchemas}} + {{> _helper_schema_python_types_newline }} + {{/each}} +], + {{/if}} + {{/with}} + {{else}} + {{#if required}} +body: typing.Union[ + {{#each content}} + request_body.{{../../requestBody.jsonPathPiece.camelCase}}.content["{{{@key.original}}}"].schema, + {{/each}} + {{#each getContentSchemas}} + {{> _helper_schema_python_types_newline }} + {{/each}} +], + {{/if}} + {{/if}} + {{/with}} +{{/if}} +{{#if hasRequiredPathParams}} +path_params: RequestPathParameters.Params, +{{/if}} +{{#if hasRequiredQueryParams}} +query_params: RequestQueryParameters.Params, +{{/if}} +{{#if hasRequiredHeaderParams}} +header_params: RequestHeaderParameters.Params, +{{/if}} +{{#if hasRequiredCookieParams}} +cookie_params: RequestCookieParameters.Params, +{{/if}} \ No newline at end of file diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation.hbs index 110354d05e4..24482e765c1 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/paths/path/verb/operation.hbs @@ -158,33 +158,16 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): -{{#if requestBody}} - {{#each getContentTypeToOperation}} @typing.overload def _{{operationId.snakeCase}}( - {{> paths/path/verb/_helper_operation_args rootSecurity=../security isOverload=true skipDeserialization="False" contentType=@key}} + {{> paths/path/verb/_helper_operation_args rootSecurity=../security isOverload=true skipDeserialization=false}} - {{/each}} @typing.overload def _{{operationId.snakeCase}}( - {{> paths/path/verb/_helper_operation_args rootSecurity=../security isOverload=true skipDeserialization="False" contentType="null"}} + {{> paths/path/verb/_helper_operation_args rootSecurity=../security isOverload=true skipDeserialization=true}} -{{else}} - @typing.overload - def _{{operationId.snakeCase}}( - {{> paths/path/verb/_helper_operation_args rootSecurity=../security isOverload=true skipDeserialization="False" contentType="null"}} -{{/if}} - - @typing.overload def _{{operationId.snakeCase}}( - {{> paths/path/verb/_helper_operation_args rootSecurity=../security isOverload=true skipDeserialization="True" contentType="null"}} - - @typing.overload - def _{{operationId.snakeCase}}( - {{> paths/path/verb/_helper_operation_args rootSecurity=../security isOverload=true skipDeserialization="null" contentType="null"}} - - def _{{operationId.snakeCase}}( - {{> paths/path/verb/_helper_operation_args rootSecurity=../security isOverload=false skipDeserialization="null" contentType="null"}} + {{> paths/path/verb/_helper_operation_args rootSecurity=../security isOverload=false skipDeserialization=null}} """ {{#if summary}} {{summary}} @@ -317,11 +300,14 @@ class BaseApi(api_client.Api): {{/if}} {{#if statusCodeResponses}} if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ {{#each statusCodeResponses}} '{{@key}}', {{/each}} - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) {{#if wildcardCodeResponses}} diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/rest.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/rest.hbs index ff6129e9fee..63e816aa86a 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/rest.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/rest.hbs @@ -9,6 +9,7 @@ import typing import certifi import urllib3 +from urllib3 import fields from urllib3 import exceptions as urllib3_exceptions from urllib3._collections import HTTPHeaderDict @@ -16,6 +17,24 @@ from {{packageName}} import exceptions logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ class RESTClientObject(object): @@ -85,7 +104,7 @@ class RESTClientObject(object): method: str, url: str, headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, body: typing.Optional[typing.Union[str, bytes]] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, diff --git a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs index c6429d6c617..d62a13b607c 100644 --- a/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs +++ b/modules/openapi-json-schema-generator/src/main/resources/python/schemas.hbs @@ -2193,10 +2193,10 @@ class ListSchema( types = {tuple} @classmethod - def from_openapi_data_(cls, arg: typing.List[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): + def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: + def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: return super().__new__(cls, arg_, **kwargs) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_client.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_client.py index 10d095e45b2..141bbdded25 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_client.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_client.py @@ -31,13 +31,6 @@ from unit_test_api.configurations import api_configuration, schema_configuration as schema_configuration_ -class RequestField(fields.RequestField): - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - class JSONEncoder(json.JSONEncoder): compact_separators = (',', ':') @@ -773,7 +766,10 @@ def serialize( class TypedDictInputVerifier: @staticmethod - def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict], data: typing.Mapping[str, typing.Any]): + def _verify_typed_dict_inputs( + tdict_cls: typing.Type[typing_extensions.TypedDict], + data: typing.Optional[typing.Mapping[str, typing.Any]] + ): """ Ensures that: - required keys are present @@ -784,7 +780,7 @@ def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict missing_required_keys = [] required_keys_with_unset_values = [] for required_key in tdict_cls.__required_keys__: - if required_key not in data: + if data is None or required_key not in data: missing_required_keys.append(required_key) continue value = data[required_key] @@ -804,10 +800,11 @@ def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict ) disallowed_additional_keys = [] - for key in data: - if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) + if data is not None: + for key in data: + if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) if disallowed_additional_keys: raise exceptions.ApiTypeError( '{} got {} unexpected keyword arguments: {}'.format( @@ -1022,7 +1019,7 @@ def call_api( host: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1092,7 +1089,7 @@ def request( method: str, url: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, body: typing.Union[str, bytes, None] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1191,9 +1188,9 @@ class Api(TypedDictInputVerifier): def _get_used_path( used_path: str, path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + path_params: typing.Optional[typing_extensions.TypedDict] = None, query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None + query_params: typing.Optional[typing_extensions.TypedDict] = None ) -> str: used_path_params = {} if path_params is not None: @@ -1201,6 +1198,7 @@ def _get_used_path( parameter_data = path_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) used_path_params.update(serialized_data) @@ -1215,6 +1213,7 @@ def _get_used_path( continue if prefix_separator_iterator is None: prefix_separator_iterator = parameter.get_prefix_separator_iterator() + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value @@ -1223,7 +1222,7 @@ def _get_used_path( @staticmethod def _get_headers( header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + header_params: typing.Optional[typing_extensions.TypedDict] = None, accept_content_types: typing.Tuple[str, ...] = (), ) -> _collections.HTTPHeaderDict: headers = _collections.HTTPHeaderDict() @@ -1232,6 +1231,7 @@ def _get_headers( parameter_data = header_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) headers.extend(serialized_data) if accept_content_types: @@ -1241,7 +1241,7 @@ def _get_headers( @staticmethod def _get_fields_and_body( - request_body: 'RequestBody', + request_body: typing.Type[RequestBody], body: typing.Any, headers: _collections.HTTPHeaderDict, content_type: str @@ -1273,7 +1273,7 @@ def _verify_response_status(response: api_response.ApiResponse): class SerializedRequestBody(typing_extensions.TypedDict, total=False): body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] + fields: typing.Tuple[rest.RequestField, ...] class RequestBody(StyleFormSerializer, JSONDetector): @@ -1309,24 +1309,24 @@ def __serialize_text_plain(in_data: typing.Any) -> SerializedRequestBody: return {'body': str(in_data)} @classmethod - def __multipart_json_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_json_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: json_value = cls.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) request_field.make_multipart(content_type='application/json') return request_field @classmethod - def __multipart_form_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_form_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: if isinstance(value, str): - request_field = RequestField(name=key, data=str(value)) + request_field = rest.RequestField(name=key, data=str(value)) request_field.make_multipart(content_type='text/plain') elif isinstance(value, bytes): - request_field = RequestField(name=key, data=value) + request_field = rest.RequestField(name=key, data=value) request_field.make_multipart(content_type='application/octet-stream') elif isinstance(value, schemas.FileIO): # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(RequestField, request_field) + request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, request_field) value.close() else: request_field = cls.__multipart_json_item(key=key, value=value) @@ -1355,7 +1355,7 @@ def __serialize_multipart_form_data( for key, value in in_data.items(): if isinstance(value, tuple): if value: - # values use explode = True, so the code makes a RequestField for each item with name=key + # values use explode = True, so the code makes a rest.RequestField for each item with name=key for item in value: request_field = cls.__multipart_form_item(key=key, value=item) fields.append(request_field) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_response.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_response.py index 4a64d656b26..f04dcb94cd1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_response.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/api_response.py @@ -25,5 +25,5 @@ class ApiResponse: @dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.Schema] = schemas.unset - headers: typing.Union[schemas.Unset, typing_extensions.TypedDict] = schemas.unset + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/_not.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/_not.py index 6d21be1f913..ef917ed0127 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/_not.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/_not.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> _Not[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py index 7a7fa53fda9..8e2e91e33fa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_allows_a_schema_which_should_validate.py @@ -74,10 +74,69 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - foo: typing.Union[Schema_.Properties.Foo, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - bar: typing.Union[Schema_.Properties.Bar, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + foo: typing.Union[ + Schema_.Properties.Foo[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + bar: typing.Union[ + Schema_.Properties.Bar[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, bool], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[schemas.BoolClass], + bool + ], ) -> AdditionalpropertiesAllowsASchemaWhichShouldValidate[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py index 29218601021..35e7c31e4db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_are_allowed_by_default.py @@ -82,11 +82,102 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - foo: typing.Union[Schema_.Properties.Foo, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - bar: typing.Union[Schema_.Properties.Bar, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + foo: typing.Union[ + Schema_.Properties.Foo[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + bar: typing.Union[ + Schema_.Properties.Bar[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AdditionalpropertiesAreAllowedByDefault[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py index 6c513c68fd8..29d67307871 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_can_exist_by_itself.py @@ -33,7 +33,10 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, bool], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[schemas.BoolClass], + bool + ], ) -> AdditionalpropertiesCanExistByItself[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py index c9e8b5e148a..3d63c358e4c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/additionalproperties_should_not_look_in_applicators.py @@ -79,10 +79,73 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - foo: typing.Union[Schema_.Properties.Foo, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + foo: typing.Union[ + Schema_.Properties.Foo[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AdditionalpropertiesShouldNotLookInApplicators.Schema_.AllOf._0[ typing.Union[ frozendict.frozendict, @@ -129,9 +192,29 @@ def __getitem__(self, name: str) -> Schema_.AdditionalProperties[schemas.BoolCla def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, bool], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[schemas.BoolClass], + bool + ], ) -> AdditionalpropertiesShouldNotLookInApplicators[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py index c2d23ff1692..4196dc94d37 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof.py @@ -76,9 +76,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Allof.Schema_.AllOf._0[ typing.Union[ frozendict.frozendict, @@ -164,9 +199,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Allof.Schema_.AllOf._1[ typing.Union[ frozendict.frozendict, @@ -209,9 +279,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Allof[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py index cb124115588..fa046fecab0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_combined_with_anyof_oneof.py @@ -39,9 +39,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofCombinedWithAnyofOneof.Schema_.AllOf._0[ typing.Union[ frozendict.frozendict, @@ -95,9 +130,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofCombinedWithAnyofOneof.Schema_.OneOf._0[ typing.Union[ frozendict.frozendict, @@ -151,9 +221,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofCombinedWithAnyofOneof.Schema_.AnyOf._0[ typing.Union[ frozendict.frozendict, @@ -195,9 +300,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofCombinedWithAnyofOneof[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_simple_types.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_simple_types.py index 9269923927c..a2c80435df5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_simple_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_simple_types.py @@ -39,9 +39,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofSimpleTypes.Schema_.AllOf._0[ typing.Union[ frozendict.frozendict, @@ -90,9 +125,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofSimpleTypes.Schema_.AllOf._1[ typing.Union[ frozendict.frozendict, @@ -135,9 +205,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofSimpleTypes[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_base_schema.py index cc4263ba3ac..60ed150f91c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_base_schema.py @@ -85,9 +85,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofWithBaseSchema.Schema_.AllOf._0[ typing.Union[ frozendict.frozendict, @@ -173,9 +208,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofWithBaseSchema.Schema_.AllOf._1[ typing.Union[ frozendict.frozendict, @@ -247,9 +317,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofWithBaseSchema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_one_empty_schema.py index 06502c861f9..2878853faee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_one_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_one_empty_schema.py @@ -33,9 +33,44 @@ class AllOf: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofWithOneEmptySchema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py index f31de878552..b5ad42a8142 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_first_empty_schema.py @@ -35,9 +35,44 @@ class AllOf: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofWithTheFirstEmptySchema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py index ca3b1db8519..b00a55a6fba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_the_last_empty_schema.py @@ -35,9 +35,44 @@ class AllOf: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofWithTheLastEmptySchema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_two_empty_schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_two_empty_schemas.py index d5b3e468afb..a78a115621e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_two_empty_schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/allof_with_two_empty_schemas.py @@ -35,9 +35,44 @@ class AllOf: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AllofWithTwoEmptySchemas[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py index fc6b23ea983..e9aee9e65dc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof.py @@ -40,9 +40,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Anyof.Schema_.AnyOf._1[ typing.Union[ frozendict.frozendict, @@ -85,9 +120,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Anyof[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_complex_types.py index e3130b0e994..a1e074a4fc4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_complex_types.py @@ -76,9 +76,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyofComplexTypes.Schema_.AnyOf._0[ typing.Union[ frozendict.frozendict, @@ -164,9 +199,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyofComplexTypes.Schema_.AnyOf._1[ typing.Union[ frozendict.frozendict, @@ -209,9 +279,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyofComplexTypes[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_base_schema.py index 06fff6ca4e7..f709e98e6dc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_base_schema.py @@ -41,9 +41,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyofWithBaseSchema.Schema_.AnyOf._0[ typing.Union[ frozendict.frozendict, @@ -92,9 +127,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyofWithBaseSchema.Schema_.AnyOf._1[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_one_empty_schema.py index 134ea123af2..0a54d1f7ec1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_one_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/anyof_with_one_empty_schema.py @@ -35,9 +35,44 @@ class AnyOf: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyofWithOneEmptySchema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/array_type_matches_arrays.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/array_type_matches_arrays.py index bfbbdc91ab6..0562514c260 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/array_type_matches_arrays.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/array_type_matches_arrays.py @@ -27,13 +27,35 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], ... - ], - typing.List[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayTypeMatchesArrays[tuple]: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_int.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_int.py index c215c34ac62..bce8744bcba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_int.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_int.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ByInt[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_number.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_number.py index 18ac3ade295..cdbac729ffc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_number.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_number.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ByNumber[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_small_number.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_small_number.py index 38668cdbca6..5fc2ceae620 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_small_number.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/by_small_number.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> BySmallNumber[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/date_time_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/date_time_format.py index 6979e27bc1b..a4f732bd35a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/date_time_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/date_time_format.py @@ -29,9 +29,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> DateTimeFormat[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/email_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/email_format.py index 4a040c75e5c..10137f7ff3e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/email_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/email_format.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> EmailFormat[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/enums_in_properties.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/enums_in_properties.py index 018f615183e..1a8dd6ab9a1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/enums_in_properties.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/enums_in_properties.py @@ -105,10 +105,35 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - bar: typing.Union[Schema_.Properties.Bar, str], - foo: typing.Union[Schema_.Properties.Foo, str, schemas.Unset] = schemas.unset, + bar: typing.Union[ + Schema_.Properties.Bar[str], + str + ], + foo: typing.Union[ + Schema_.Properties.Foo[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> EnumsInProperties[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py index ce87e115794..b4ecaa176dc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/forbidden_property.py @@ -67,10 +67,73 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - foo: typing.Union[Schema_.Properties.Foo, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + foo: typing.Union[ + Schema_.Properties.Foo[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ForbiddenProperty[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/hostname_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/hostname_format.py index f37c808264c..029776e662e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/hostname_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/hostname_format.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> HostnameFormat[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/invalid_string_value_for_default.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/invalid_string_value_for_default.py index 24f3ef7cd40..b797518a6d9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/invalid_string_value_for_default.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/invalid_string_value_for_default.py @@ -70,10 +70,49 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - bar: typing.Union[Schema_.Properties.Bar, str, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + bar: typing.Union[ + Schema_.Properties.Bar[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> InvalidStringValueForDefault[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv4_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv4_format.py index e3223a0c4d5..6fe6699aaac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv4_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv4_format.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Ipv4Format[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv6_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv6_format.py index 2b944f0a525..6eb4c21e351 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv6_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ipv6_format.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Ipv6Format[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/json_pointer_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/json_pointer_format.py index 79a161d61f0..0a6f585abcf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/json_pointer_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/json_pointer_format.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> JsonPointerFormat[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation.py index 1fd47c083e9..366559eddf4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MaximumValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py index 293d34fd348..926eb7c8c8a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maximum_validation_with_unsigned_integer.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MaximumValidationWithUnsignedInteger[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxitems_validation.py index 20805b70d81..2d219a4b1ff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxitems_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MaxitemsValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxlength_validation.py index 2577af8dcfb..f6afe9bcc88 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxlength_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxlength_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MaxlengthValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py index f461dff28bb..0866d3f2579 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties0_means_the_object_is_empty.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Maxproperties0MeansTheObjectIsEmpty[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties_validation.py index 79db7557730..c83d2a4470a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/maxproperties_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MaxpropertiesValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation.py index 5719be9ebe9..1412749b421 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MinimumValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py index 4147ec72922..f58aaa2d434 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minimum_validation_with_signed_integer.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MinimumValidationWithSignedInteger[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minitems_validation.py index 30206ceb8de..24cadc4dd5b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minitems_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MinitemsValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minlength_validation.py index e35f11bd95a..0161e958417 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minlength_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minlength_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MinlengthValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minproperties_validation.py index 9ea7e4a3b98..e35de7ca34d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minproperties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/minproperties_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MinpropertiesValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py index 3cfd220c2a4..1f5696ef5c0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_allof_to_check_validation_semantics.py @@ -44,9 +44,44 @@ class AllOf: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NestedAllofToCheckValidationSemantics.Schema_.AllOf._0[ typing.Union[ frozendict.frozendict, @@ -88,9 +123,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NestedAllofToCheckValidationSemantics[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py index 3eb58462399..69f937a9bc4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_anyof_to_check_validation_semantics.py @@ -44,9 +44,44 @@ class AnyOf: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NestedAnyofToCheckValidationSemantics.Schema_.AnyOf._0[ typing.Union[ frozendict.frozendict, @@ -88,9 +123,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NestedAnyofToCheckValidationSemantics[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_items.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_items.py index d47cde27b75..5178a97c96a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_items.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_items.py @@ -54,13 +54,13 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, decimal.Decimal, int, float], ... - ], - typing.List[ - typing.Union[Schema_.Items, decimal.Decimal, int, float] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[decimal.Decimal], + decimal.Decimal, + int, + float + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NestedItems.Schema_.Items.Schema_.Items.Schema_.Items[tuple]: @@ -80,13 +80,12 @@ def __getitem__(self, name: int) -> Schema_.Items[decimal.Decimal]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, list, tuple], ... - ], - typing.List[ - typing.Union[Schema_.Items, list, tuple] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[tuple], + list, + tuple + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NestedItems.Schema_.Items.Schema_.Items[tuple]: @@ -106,13 +105,12 @@ def __getitem__(self, name: int) -> Schema_.Items[tuple]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, list, tuple], ... - ], - typing.List[ - typing.Union[Schema_.Items, list, tuple] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[tuple], + list, + tuple + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NestedItems.Schema_.Items[tuple]: @@ -132,13 +130,12 @@ def __getitem__(self, name: int) -> Schema_.Items[tuple]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, list, tuple], ... - ], - typing.List[ - typing.Union[Schema_.Items, list, tuple] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[tuple], + list, + tuple + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NestedItems[tuple]: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py index f08c3c6c507..8d4b1adf428 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/nested_oneof_to_check_validation_semantics.py @@ -44,9 +44,44 @@ class OneOf: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NestedOneofToCheckValidationSemantics.Schema_.OneOf._0[ typing.Union[ frozendict.frozendict, @@ -88,9 +123,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NestedOneofToCheckValidationSemantics[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py index f8202fe49ee..53f3d33f485 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/not_more_complex_schema.py @@ -67,9 +67,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - foo: typing.Union[Schema_.Properties.Foo, str, schemas.Unset] = schemas.unset, + foo: typing.Union[ + Schema_.Properties.Foo[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NotMoreComplexSchema.Schema_._Not[frozendict.frozendict]: inst = super().__new__( cls, @@ -87,9 +109,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NotMoreComplexSchema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_properties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_properties_validation.py index 34db526c4a1..f1dcf90c1a1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_properties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/object_properties_validation.py @@ -64,11 +64,55 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - foo: typing.Union[Schema_.Properties.Foo, decimal.Decimal, int, schemas.Unset] = schemas.unset, - bar: typing.Union[Schema_.Properties.Bar, str, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + foo: typing.Union[ + Schema_.Properties.Foo[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + bar: typing.Union[ + Schema_.Properties.Bar[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectPropertiesValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py index 1100939aec8..4c875b6609e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof.py @@ -40,9 +40,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Oneof.Schema_.OneOf._1[ typing.Union[ frozendict.frozendict, @@ -85,9 +120,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Oneof[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_complex_types.py index 5aa09e7ded5..c17dccc2bb1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_complex_types.py @@ -76,9 +76,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> OneofComplexTypes.Schema_.OneOf._0[ typing.Union[ frozendict.frozendict, @@ -164,9 +199,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> OneofComplexTypes.Schema_.OneOf._1[ typing.Union[ frozendict.frozendict, @@ -209,9 +279,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> OneofComplexTypes[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_base_schema.py index a72fbc9ca86..54eebb13e28 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_base_schema.py @@ -41,9 +41,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> OneofWithBaseSchema.Schema_.OneOf._0[ typing.Union[ frozendict.frozendict, @@ -92,9 +127,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> OneofWithBaseSchema.Schema_.OneOf._1[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_empty_schema.py index 2e433006234..baeaf6785e3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_empty_schema.py @@ -35,9 +35,44 @@ class OneOf: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> OneofWithEmptySchema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_required.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_required.py index c06bcc1d74a..dc1ba609c6d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_required.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/oneof_with_required.py @@ -117,9 +117,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> OneofWithRequired.Schema_.OneOf._0[ typing.Union[ frozendict.frozendict, @@ -244,9 +279,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> OneofWithRequired.Schema_.OneOf._1[ typing.Union[ frozendict.frozendict, @@ -291,7 +361,25 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> OneofWithRequired[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_is_not_anchored.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_is_not_anchored.py index 44301c0d93e..72ff5e064f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_is_not_anchored.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_is_not_anchored.py @@ -30,9 +30,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> PatternIsNotAnchored[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_validation.py index 317aa4e80ac..2fab3d72df1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/pattern_validation.py @@ -30,9 +30,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> PatternValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/properties_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/properties_with_escaped_characters.py index eed6d2b5228..b33e742b085 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/properties_with_escaped_characters.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/properties_with_escaped_characters.py @@ -88,9 +88,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> PropertiesWithEscapedCharacters[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py index bb3f1d9ea63..f1ec8573687 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/property_named_ref_that_is_not_a_reference.py @@ -58,9 +58,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> PropertyNamedRefThatIsNotAReference[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_additionalproperties.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_additionalproperties.py index 9f65ba0132e..e9b0a5205f3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_additionalproperties.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_additionalproperties.py @@ -45,7 +45,34 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union['property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + **kwargs: typing.Union[ + property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], ) -> RefInAdditionalproperties[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py index b6eef05d708..e5a66061416 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_allof.py @@ -36,9 +36,44 @@ def _0() -> typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamed def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> RefInAllof[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py index 654b6257c26..0f9fe6d1f87 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_anyof.py @@ -36,9 +36,44 @@ def _0() -> typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamed def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> RefInAnyof[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_items.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_items.py index 466ec39ffbc..3b4d5f59763 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_items.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_items.py @@ -30,13 +30,35 @@ def items() -> typing.Type[property_named_ref_that_is_not_a_reference.PropertyNa def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], ... - ], - typing.List[ - typing.Union['property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader] - ], + arg_: typing.Sequence[ + typing.Union[ + property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> RefInItems[tuple]: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py index 36567d38695..5a139ae4739 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_not.py @@ -31,9 +31,44 @@ def _not() -> typing.Type[property_named_ref_that_is_not_a_reference.PropertyNam def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> RefInNot[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py index f3dfca5b754..c5da56f37f3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_oneof.py @@ -36,9 +36,44 @@ def _0() -> typing.Type[property_named_ref_that_is_not_a_reference.PropertyNamed def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> RefInOneof[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_property.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_property.py index c009a2fe414..4fc7813ae2c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_property.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/ref_in_property.py @@ -70,10 +70,73 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - a: typing.Union['property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + a: typing.Union[ + property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> RefInProperty[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_default_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_default_validation.py index 528858aff1b..766c2e51bb6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_default_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_default_validation.py @@ -67,10 +67,73 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - foo: typing.Union[Schema_.Properties.Foo, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + foo: typing.Union[ + Schema_.Properties.Foo[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> RequiredDefaultValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_validation.py index 069656589b8..5c6f3623ea7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_validation.py @@ -98,10 +98,73 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - bar: typing.Union[Schema_.Properties.Bar, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + bar: typing.Union[ + Schema_.Properties.Bar[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> RequiredValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_empty_array.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_empty_array.py index 7ff6173c1bb..4dc13bd91c9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_empty_array.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_empty_array.py @@ -67,10 +67,73 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - foo: typing.Union[Schema_.Properties.Foo, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + foo: typing.Union[ + Schema_.Properties.Foo[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> RequiredWithEmptyArray[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_escaped_characters.py index 96b739a2c5e..f48b099cd21 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_escaped_characters.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/required_with_escaped_characters.py @@ -134,9 +134,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> RequiredWithEscapedCharacters[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py index 50a5e05efc1..d07431c05a0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py @@ -70,9 +70,33 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - alpha: typing.Union[Schema_.Properties.Alpha, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + alpha: typing.Union[ + Schema_.Properties.Alpha[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_false_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_false_validation.py index a6d533452e5..da3746ad462 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_false_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_false_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> UniqueitemsFalseValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_validation.py index b611b3d250b..980c83f98e1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uniqueitems_validation.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> UniqueitemsValidation[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_format.py index f65f7b77b57..15599d775e5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_format.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> UriFormat[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_reference_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_reference_format.py index 904762ac6c6..0e95c99f9f9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_reference_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_reference_format.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> UriReferenceFormat[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_template_format.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_template_format.py index 2136b6d76c6..cb9707e53f3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_template_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/components/schema/uri_template_format.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> UriTemplateFormat[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py index fe2d9d7a1b8..a438a5d51e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_request_bod dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_request_bod self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py index 259a770647d..495e3ecb92e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py index 8c078235aee..d7b71bb3769 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_additionalproperties_are_allowed_by_default_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_additionalproperties_are_allowed_by_default_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_additionalproperties_are_allowed_by_default_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py index 3e386963767..6f2c05e9c9b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_additionalproperties_can_exist_by_itself_request_body( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_additionalproperties_can_exist_by_itself_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_additionalproperties_can_exist_by_itself_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py index 259a770647d..495e3ecb92e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py index d3fb504b9a7..2819557d431 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_additionalproperties_should_not_look_in_applicators_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_additionalproperties_should_not_look_in_applicators_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_additionalproperties_should_not_look_in_applicators_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py index a4e2b9430aa..433552d9701 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_allof_combined_with_anyof_oneof_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_allof_combined_with_anyof_oneof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_combined_with_anyof_oneof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_request_body/post/operation.py index ab3b8a4cde1..088361ffec8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_allof_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_allof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_allof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/operation.py index 2043afdf3b1..e3a31a23e16 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_allof_simple_types_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_allof_simple_types_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_allof_simple_types_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_simple_types_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_simple_types_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py index 3799c852590..7c387447b49 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_allof_with_base_schema_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_allof_with_base_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_allof_with_base_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_with_base_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_with_base_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py index ca5631ab412..a5fb29b5d0e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_allof_with_one_empty_schema_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_allof_with_one_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_with_one_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py index 9915e18c7e8..157b00e2d4a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_allof_with_the_first_empty_schema_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_allof_with_the_first_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_with_the_first_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py index 0f68a8ce2de..206aa51bfa1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_allof_with_the_last_empty_schema_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_allof_with_the_last_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_with_the_last_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py index 84c991462f3..141d9f0f006 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_allof_with_two_empty_schemas_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_allof_with_two_empty_schemas_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_with_two_empty_schemas_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/operation.py index 422b674e348..0090b9717c5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_anyof_complex_types_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_anyof_complex_types_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_anyof_complex_types_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_anyof_complex_types_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_anyof_complex_types_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_request_body/post/operation.py index 40e15753dc5..59de34d4ad8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_anyof_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_anyof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_anyof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_anyof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_anyof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py index 08616b297c9..0acbb80c6b8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/operation.py @@ -32,11 +32,11 @@ def _post_anyof_with_base_schema_request_body( request_body.RequestBody.content["application/json"].schema, str ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -44,58 +44,26 @@ def _post_anyof_with_base_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_anyof_with_base_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str + str ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_anyof_with_base_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_anyof_with_base_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str + str ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,9 +100,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py index 259a770647d..467410db473 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[str] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py index f6b94aba46e..069c84a2000 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_anyof_with_one_empty_schema_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_anyof_with_one_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_anyof_with_one_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py index 836577b5476..63c6fb05ed1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_array_type_matches_arrays_request_body( list, tuple ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_array_type_matches_arrays_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_array_type_matches_arrays_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple + list, + tuple ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_array_type_matches_arrays_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_array_type_matches_arrays_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple + list, + tuple ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py index 259a770647d..c5f64c17843 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[tuple] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py index 562f2218d9c..ae700f98c79 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/operation.py @@ -32,11 +32,11 @@ def _post_boolean_type_matches_booleans_request_body( request_body.RequestBody.content["application/json"].schema, bool ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -44,58 +44,26 @@ def _post_boolean_type_matches_booleans_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - bool - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - bool + bool ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - bool - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_boolean_type_matches_booleans_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - bool + bool ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,9 +100,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py index 259a770647d..4edbbad7d6f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[schemas.BoolClass] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_int_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_int_request_body/post/operation.py index 1404a1da631..241ce20d253 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_int_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_int_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_by_int_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_by_int_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_by_int_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_by_int_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_by_int_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_int_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_number_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_number_request_body/post/operation.py index 6fcdef9967c..7081571373a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_number_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_number_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_by_number_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_by_number_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_by_number_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_by_number_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_by_number_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_number_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/operation.py index d736d9b8fef..ec34c9c7d55 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_by_small_number_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_by_small_number_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_by_small_number_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_by_small_number_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_by_small_number_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_by_small_number_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/operation.py index 2af2846be4a..b924946a96a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_date_time_format_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_date_time_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_date_time_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_date_time_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_date_time_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_date_time_format_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_email_format_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_email_format_request_body/post/operation.py index c8308f7481d..cc7b215003b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_email_format_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_email_format_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_email_format_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_email_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_email_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_email_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_email_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_email_format_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py index a3fe8bec046..f83d43bbf25 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/operation.py @@ -34,11 +34,11 @@ def _post_enum_with0_does_not_match_false_request_body( int, float ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -46,66 +46,30 @@ def _post_enum_with0_does_not_match_false_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float + decimal.Decimal, + int, + float ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_enum_with0_does_not_match_false_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float + decimal.Decimal, + int, + float ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -142,9 +106,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py index 259a770647d..e69c6404e0f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[decimal.Decimal] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py index b28d40b222f..ebb0a901d67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/operation.py @@ -34,11 +34,11 @@ def _post_enum_with1_does_not_match_true_request_body( int, float ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -46,66 +46,30 @@ def _post_enum_with1_does_not_match_true_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float + decimal.Decimal, + int, + float ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_enum_with1_does_not_match_true_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float + decimal.Decimal, + int, + float ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -142,9 +106,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py index 259a770647d..e69c6404e0f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[decimal.Decimal] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py index 87135b6bfc2..9d1d7772b71 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/operation.py @@ -32,11 +32,11 @@ def _post_enum_with_escaped_characters_request_body( request_body.RequestBody.content["application/json"].schema, str ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -44,58 +44,26 @@ def _post_enum_with_escaped_characters_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str + str ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_enum_with_escaped_characters_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str + str ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,9 +100,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py index 259a770647d..467410db473 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[str] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py index c132793a073..d92fb93a1d5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/operation.py @@ -32,11 +32,11 @@ def _post_enum_with_false_does_not_match0_request_body( request_body.RequestBody.content["application/json"].schema, bool ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -44,58 +44,26 @@ def _post_enum_with_false_does_not_match0_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - bool - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - bool + bool ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - bool - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_enum_with_false_does_not_match0_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - bool + bool ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,9 +100,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py index 259a770647d..4edbbad7d6f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[schemas.BoolClass] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py index 68b113ceeea..9e7e6eeb861 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/operation.py @@ -32,11 +32,11 @@ def _post_enum_with_true_does_not_match1_request_body( request_body.RequestBody.content["application/json"].schema, bool ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -44,58 +44,26 @@ def _post_enum_with_true_does_not_match1_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - bool - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - bool + bool ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - bool - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_enum_with_true_does_not_match1_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - bool + bool ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,9 +100,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py index 259a770647d..4edbbad7d6f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[schemas.BoolClass] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/operation.py index 0c703660b02..5857173c769 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_enums_in_properties_request_body( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_enums_in_properties_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_enums_in_properties_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_enums_in_properties_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enums_in_properties_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py index 259a770647d..495e3ecb92e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/operation.py index 22b25726cf1..d8113c850ee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_forbidden_property_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_forbidden_property_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_forbidden_property_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_forbidden_property_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_forbidden_property_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_forbidden_property_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/operation.py index 7b06afe7ff1..cc78f63e868 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_hostname_format_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_hostname_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_hostname_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_hostname_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_hostname_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_hostname_format_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py index e14fa353ae3..99843d767a9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_integer_type_matches_integers_request_body( decimal.Decimal, int ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_integer_type_matches_integers_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_integer_type_matches_integers_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int + decimal.Decimal, + int ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_integer_type_matches_integers_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_integer_type_matches_integers_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int + decimal.Decimal, + int ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py index 259a770647d..e69c6404e0f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[decimal.Decimal] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py index d74fcdf9cc2..ecc221d04ba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_invalid_instance_should_not_raise_error_when_float_division_inf_reques decimal.Decimal, int ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_invalid_instance_should_not_raise_error_when_float_division_inf_reques self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int + decimal.Decimal, + int ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int + decimal.Decimal, + int ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py index 259a770647d..e69c6404e0f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[decimal.Decimal] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py index fed11596976..d6782b512cf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_invalid_string_value_for_default_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_invalid_string_value_for_default_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_invalid_string_value_for_default_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/operation.py index 0d5f5915607..0049d60c2ef 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_ipv4_format_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_ipv4_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_ipv4_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ipv4_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ipv4_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv4_format_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/operation.py index c3edd637dc1..e5eebafef4f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_ipv6_format_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_ipv6_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_ipv6_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ipv6_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ipv6_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ipv6_format_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/operation.py index 93c05ffda8d..95dd4871c05 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_json_pointer_format_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_json_pointer_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_json_pointer_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_json_pointer_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_json_pointer_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/operation.py index 66260fd19b2..432a0e4ac41 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_maximum_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_maximum_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_maximum_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maximum_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maximum_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py index 124f718b16b..c5b5a1dc2e1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_maximum_validation_with_unsigned_integer_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_maximum_validation_with_unsigned_integer_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maximum_validation_with_unsigned_integer_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/operation.py index caa37f8f84b..d39de941a1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_maxitems_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_maxitems_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_maxitems_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maxitems_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maxitems_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/operation.py index 8227c4b2dc3..260c4289ece 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_maxlength_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_maxlength_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_maxlength_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maxlength_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maxlength_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py index 2539dd221b5..e15925bd93f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_maxproperties0_means_the_object_is_empty_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_maxproperties0_means_the_object_is_empty_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maxproperties0_means_the_object_is_empty_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/operation.py index c12f21f8b4d..e4f60517f9b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_maxproperties_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_maxproperties_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_maxproperties_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maxproperties_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maxproperties_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/operation.py index 597100b31c6..da7e041b0cd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_minimum_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_minimum_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_minimum_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_minimum_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minimum_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py index bfb77f50475..bf417397f7f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_minimum_validation_with_signed_integer_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_minimum_validation_with_signed_integer_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minimum_validation_with_signed_integer_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/operation.py index 1ab5363adda..7db9621c6a7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_minitems_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_minitems_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_minitems_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_minitems_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minitems_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minitems_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/operation.py index 711908e2260..02a215998a9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_minlength_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_minlength_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_minlength_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_minlength_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minlength_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minlength_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/operation.py index ad7b10b88de..d353ea543a1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_minproperties_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_minproperties_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_minproperties_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_minproperties_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minproperties_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py index e49ef07582f..0024d51add2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_nested_allof_to_check_validation_semantics_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_nested_allof_to_check_validation_semantics_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_nested_allof_to_check_validation_semantics_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py index 9fa0e820b74..18575bd6961 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_nested_anyof_to_check_validation_semantics_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_nested_anyof_to_check_validation_semantics_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_nested_anyof_to_check_validation_semantics_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_items_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_items_request_body/post/operation.py index e6f124b1e9d..2367fd9625e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_items_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_items_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_nested_items_request_body( list, tuple ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_nested_items_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_nested_items_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple + list, + tuple ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_nested_items_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_items_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple + list, + tuple ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py index 259a770647d..c5f64c17843 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_items_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[tuple] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py index f62bba464da..668afe7b041 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_nested_oneof_to_check_validation_semantics_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_nested_oneof_to_check_validation_semantics_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_nested_oneof_to_check_validation_semantics_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py index a99be909f2d..8409527d4f4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_not_more_complex_schema_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_not_more_complex_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_not_more_complex_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_not_more_complex_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_not_more_complex_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py index b3b87091699..e0b073759d9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_not_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_not_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_not_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_not_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_not_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_not_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py index 33892d1e57e..b1f7cc13052 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/operation.py @@ -32,11 +32,11 @@ def _post_nul_characters_in_strings_request_body( request_body.RequestBody.content["application/json"].schema, str ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -44,58 +44,26 @@ def _post_nul_characters_in_strings_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_nul_characters_in_strings_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str + str ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_nul_characters_in_strings_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_nul_characters_in_strings_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str + str ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,9 +100,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py index 259a770647d..467410db473 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[str] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py index 80ab2277523..af6400ccce7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/operation.py @@ -32,11 +32,11 @@ def _post_null_type_matches_only_the_null_object_request_body( request_body.RequestBody.content["application/json"].schema, None ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -44,58 +44,26 @@ def _post_null_type_matches_only_the_null_object_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - None - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - None + None ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - None - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_null_type_matches_only_the_null_object_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - None + None ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,9 +100,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py index 259a770647d..8b0ed8d6e03 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[schemas.NoneClass] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py index c9d580cd648..31749e47e4d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/operation.py @@ -34,11 +34,11 @@ def _post_number_type_matches_numbers_request_body( int, float ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -46,66 +46,30 @@ def _post_number_type_matches_numbers_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_number_type_matches_numbers_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float + decimal.Decimal, + int, + float ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_number_type_matches_numbers_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_number_type_matches_numbers_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float + decimal.Decimal, + int, + float ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -142,9 +106,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py index 259a770647d..e69c6404e0f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[decimal.Decimal] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/operation.py index 04f02d6c69f..ba2455085c6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_object_properties_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_object_properties_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_object_properties_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_object_properties_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_object_properties_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py index a5ceac0a9e8..d3e6a466388 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_object_type_matches_objects_request_body( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_object_type_matches_objects_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_object_type_matches_objects_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_object_type_matches_objects_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_object_type_matches_objects_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py index 259a770647d..495e3ecb92e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/operation.py index de362e39d7f..66f5dd8687b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_oneof_complex_types_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_oneof_complex_types_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_oneof_complex_types_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_oneof_complex_types_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_oneof_complex_types_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_request_body/post/operation.py index 98fb54e8e6a..b3405068c2e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_oneof_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_oneof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_oneof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_oneof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_oneof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py index 89e65f735cf..064be9caef0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/operation.py @@ -32,11 +32,11 @@ def _post_oneof_with_base_schema_request_body( request_body.RequestBody.content["application/json"].schema, str ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -44,58 +44,26 @@ def _post_oneof_with_base_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_oneof_with_base_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str + str ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_oneof_with_base_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_oneof_with_base_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str + str ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,9 +100,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py index 259a770647d..467410db473 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[str] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py index fb82a52233d..bf43520ef0e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_oneof_with_empty_schema_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_oneof_with_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_oneof_with_empty_schema_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/operation.py index 29c8ba722d7..0f28c9ea09d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_oneof_with_required_request_body( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_oneof_with_required_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_oneof_with_required_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_oneof_with_required_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_required_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py index 259a770647d..495e3ecb92e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py index 76cdd95071f..0d8a81fd44e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_pattern_is_not_anchored_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_pattern_is_not_anchored_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_pattern_is_not_anchored_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/operation.py index 7174a213ca7..b7d031ed9c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_pattern_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_pattern_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_pattern_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_pattern_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_pattern_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_pattern_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py index b08c8e4972b..ac7a8c0503b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_properties_with_escaped_characters_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_properties_with_escaped_characters_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_properties_with_escaped_characters_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py index b11bf93fde9..b3e8b24001e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_property_named_ref_that_is_not_a_reference_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_property_named_ref_that_is_not_a_reference_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_property_named_ref_that_is_not_a_reference_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py index 5ad1cfddecf..fe776921318 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_ref_in_additionalproperties_request_body( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_ref_in_additionalproperties_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_ref_in_additionalproperties_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py index 259a770647d..495e3ecb92e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/operation.py index 538f0bc67e5..378bb8e7e10 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_ref_in_allof_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_ref_in_allof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_ref_in_allof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_allof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_allof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/operation.py index c4b691efdb2..8916498c175 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_ref_in_anyof_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_ref_in_anyof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_ref_in_anyof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_anyof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_anyof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/operation.py index 8ec461d6109..a8fd5b137db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_ref_in_items_request_body( list, tuple ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_ref_in_items_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_ref_in_items_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple + list, + tuple ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_ref_in_items_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_items_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple + list, + tuple ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py index 259a770647d..c5f64c17843 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_items_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[tuple] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/operation.py index df450573319..0ea39509bea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_ref_in_not_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_ref_in_not_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_ref_in_not_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_not_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_not_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_not_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/operation.py index 7c10aae6abf..2c850814b24 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_ref_in_oneof_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_ref_in_oneof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_ref_in_oneof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_oneof_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_oneof_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/operation.py index cd22b06aa79..06fdd88f172 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_ref_in_property_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_ref_in_property_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_ref_in_property_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_property_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_property_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_ref_in_property_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/operation.py index 498bb21dce8..03888965bce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_required_default_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_required_default_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_required_default_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_required_default_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_required_default_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_default_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_validation_request_body/post/operation.py index 715487c67cb..3fc4cbf684e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_required_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_required_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_required_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_required_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_required_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/operation.py index 5db0813bf32..8c045e593a0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_required_with_empty_array_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_required_with_empty_array_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_required_with_empty_array_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_required_with_empty_array_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_required_with_empty_array_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py index 91440943fb0..2a19caaf293 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_required_with_escaped_characters_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_required_with_escaped_characters_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_required_with_escaped_characters_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_required_with_escaped_characters_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_required_with_escaped_characters_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/operation.py index ac435c8f819..549d5e86233 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/operation.py @@ -34,11 +34,11 @@ def _post_simple_enum_validation_request_body( int, float ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -46,66 +46,30 @@ def _post_simple_enum_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_simple_enum_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float + decimal.Decimal, + int, + float ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_simple_enum_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_simple_enum_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - decimal.Decimal, - int, - float + decimal.Decimal, + int, + float ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -142,9 +106,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py index 259a770647d..e69c6404e0f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[decimal.Decimal] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py index fafd57145eb..c913f9135d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/operation.py @@ -32,11 +32,11 @@ def _post_string_type_matches_strings_request_body( request_body.RequestBody.content["application/json"].schema, str ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -44,58 +44,26 @@ def _post_string_type_matches_strings_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_string_type_matches_strings_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str + str ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_string_type_matches_strings_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - str - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_string_type_matches_strings_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - str + str ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -132,9 +100,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py index 259a770647d..467410db473 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[str] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py index 1f2072025b7..0c3e1df1e9b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/operation.py @@ -33,11 +33,11 @@ def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_re dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_re self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py index 259a770647d..495e3ecb92e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py index 1b191084e1f..f86aadd2d79 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_uniqueitems_false_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_uniqueitems_false_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uniqueitems_false_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py index 84ff85bd069..dd463170e3d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_uniqueitems_validation_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_uniqueitems_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_uniqueitems_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uniqueitems_validation_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uniqueitems_validation_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_format_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_format_request_body/post/operation.py index 71e71287424..7a86d295125 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_format_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_format_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_uri_format_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_uri_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_uri_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uri_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uri_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_format_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/operation.py index 846e1095d2b..44640e7ffe2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_uri_reference_format_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_uri_reference_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_uri_reference_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uri_reference_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uri_reference_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/operation.py index c6c961fdb2d..a6f07b65fd0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/operation.py @@ -47,11 +47,11 @@ def _post_uri_template_format_request_body( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,118 +59,56 @@ def _post_uri_template_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_uri_template_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uri_template_format_request_body( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uri_template_format_request_body( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -207,9 +145,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py index 259a770647d..68a1b858d1d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/request_body_post_uri_template_format_request_body/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py index 91a546a580e..a721b9bbe80 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_additionalproperties_allows_a_schema_which_should_validate_response_bo server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py index f05955db33f..665f83172bc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_additionalproperties_are_allowed_by_default_response_body_for_content_ server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py index f4dd21d03ca..2dae33f2cf6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_additionalproperties_can_exist_by_itself_response_body_for_content_typ server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py index a361cf1c7fd..fda382505f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_additionalproperties_should_not_look_in_applicators_response_body_for_ server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py index 21f85a2a70f..942f8b2e2e5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/operation.py index 15dcb2c04fb..22c88ee562f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_allof_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_allof_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py index 491e9fd1519..1a27fd50e2e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_allof_simple_types_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_allof_simple_types_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_allof_simple_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_simple_types_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py index 62cfbc2fb21..dc1e5eb2140 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_allof_with_base_schema_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_allof_with_base_schema_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_with_base_schema_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py index c44aaa6c215..041ab2ade65 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_allof_with_one_empty_schema_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_allof_with_one_empty_schema_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_with_one_empty_schema_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py index 7fc00917c39..a4a3ff607ad 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_allof_with_the_first_empty_schema_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_allof_with_the_first_empty_schema_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py index 4054f956fb0..2fba5b5de73 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_allof_with_the_last_empty_schema_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_allof_with_the_last_empty_schema_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py index 3dbaac56d64..d1c2d9eb082 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_allof_with_two_empty_schemas_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_allof_with_two_empty_schemas_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_allof_with_two_empty_schemas_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py index 1a894275481..d6adf927a9b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_anyof_complex_types_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_anyof_complex_types_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_anyof_complex_types_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py index 36538d46f9b..b5720325dc7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_anyof_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_anyof_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_anyof_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py index 3d358b1aaff..b2b0e61469f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_anyof_with_base_schema_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_anyof_with_base_schema_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_anyof_with_base_schema_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py index 13425fba433..36d660879a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_anyof_with_one_empty_schema_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_anyof_with_one_empty_schema_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_anyof_with_one_empty_schema_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py index 6a0df514cbf..02a35c0bde1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_array_type_matches_arrays_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_array_type_matches_arrays_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_array_type_matches_arrays_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py index 12e56d976ea..44497754763 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_boolean_type_matches_booleans_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_boolean_type_matches_booleans_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_boolean_type_matches_booleans_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py index 414a1ad905e..2c138402b60 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_by_int_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_by_int_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_by_int_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_by_int_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py index 7071875f38c..d5ba3745787 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_by_number_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_by_number_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_by_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_by_number_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py index 6512c9184aa..926f95f1eb8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_by_small_number_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_by_small_number_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_by_small_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_by_small_number_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py index 24c0f8fa6b7..64b648b7606 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_date_time_format_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_date_time_format_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_date_time_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_date_time_format_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py index 1476420919c..5bf80aea83e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_email_format_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_email_format_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_email_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_email_format_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py index 830722ce192..35071dc91c4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_enum_with0_does_not_match_false_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_enum_with0_does_not_match_false_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py index 3083d479f06..4411cd5b7e6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_enum_with1_does_not_match_true_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_enum_with1_does_not_match_true_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py index 0b49318188a..f5657f65e80 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_enum_with_escaped_characters_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_enum_with_escaped_characters_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_enum_with_escaped_characters_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py index 4ea9e908ceb..ede69591e8f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_enum_with_false_does_not_match0_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_enum_with_false_does_not_match0_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py index b8bbe4ff03d..663abfb8010 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_enum_with_true_does_not_match1_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_enum_with_true_does_not_match1_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py index edb9efc452a..213c966d1e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_enums_in_properties_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_enums_in_properties_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_enums_in_properties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_enums_in_properties_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py index 80eb6968e6b..18529385879 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_forbidden_property_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_forbidden_property_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_forbidden_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_forbidden_property_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py index a6ab798ecad..70e6c0c99a6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_hostname_format_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_hostname_format_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_hostname_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_hostname_format_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py index 4dec0cf8982..30a354943e5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_integer_type_matches_integers_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_integer_type_matches_integers_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_integer_type_matches_integers_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py index 7a01cbfec1a..26d52884ad2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_invalid_instance_should_not_raise_error_when_float_division_inf_respon server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py index 497d2bb0de1..54ed3b75708 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_invalid_string_value_for_default_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_invalid_string_value_for_default_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_invalid_string_value_for_default_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py index 029ae717d6c..1b201b83457 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_ipv4_format_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_ipv4_format_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ipv4_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ipv4_format_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py index 30b2e821b7e..c6c19027141 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_ipv6_format_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_ipv6_format_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ipv6_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ipv6_format_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py index 0d3ce10580e..650b90eaaf1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_json_pointer_format_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_json_pointer_format_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_json_pointer_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_json_pointer_format_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py index 555e072768b..efba04aefc8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_maximum_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_maximum_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maximum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maximum_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py index 0cb376284cd..e655cebc4d1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_maximum_validation_with_unsigned_integer_response_body_for_content_typ server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py index 4e684ca428b..faa2dd9bcc0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_maxitems_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_maxitems_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maxitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maxitems_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py index a283d098559..d1152b73e99 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_maxlength_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_maxlength_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maxlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maxlength_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py index 323a6d62bda..1fa324378b6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_typ server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py index 8c4a9d91e84..86e6d1b7955 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_maxproperties_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_maxproperties_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_maxproperties_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py index 1360c4bec2f..4851306b615 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_minimum_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_minimum_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_minimum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minimum_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py index 40d77695dc8..dc259cff8f8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_minimum_validation_with_signed_integer_response_body_for_content_types server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_minimum_validation_with_signed_integer_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minimum_validation_with_signed_integer_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py index 17c9aeb790e..c207278740b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_minitems_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_minitems_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_minitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minitems_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py index ddd06254a95..ef8f25ebe74 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_minlength_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_minlength_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_minlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minlength_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py index 0dd3c07b915..c70a651a662 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_minproperties_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_minproperties_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_minproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_minproperties_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py index 95273a4e7ed..cb619542a98 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_nested_allof_to_check_validation_semantics_response_body_for_content_t server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py index 772b732bd9c..21c2d633f3f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_t server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py index 29fd23280b2..d52ca8a1afd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_nested_items_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_nested_items_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_nested_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_nested_items_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py index 83f544f9bc4..d76331943ec 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_t server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py index d847df8b114..0cff512bdca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_not_more_complex_schema_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_not_more_complex_schema_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_not_more_complex_schema_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/operation.py index 4e5caa73dde..2587e02c997 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_not_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_not_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_not_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py index b32d190aa24..170dea19de4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_nul_characters_in_strings_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_nul_characters_in_strings_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_nul_characters_in_strings_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py index b08b38c4c44..e5a9d385c1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_null_type_matches_only_the_null_object_response_body_for_content_types server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_null_type_matches_only_the_null_object_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py index 0edfaba3353..006c5fbbfe6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_number_type_matches_numbers_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_number_type_matches_numbers_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_number_type_matches_numbers_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py index 3218f1ef879..de204367c19 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_object_properties_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_object_properties_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_object_properties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_object_properties_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py index f679389da68..839e83ba480 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_object_type_matches_objects_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_object_type_matches_objects_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_object_type_matches_objects_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py index 551851a7806..e7fc9ec10f1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_oneof_complex_types_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_oneof_complex_types_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_oneof_complex_types_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py index 5cebd608d19..10cfde7da04 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_oneof_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_oneof_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_oneof_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py index aa0a45a2cbd..3706f38eec5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_oneof_with_base_schema_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_oneof_with_base_schema_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_oneof_with_base_schema_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py index a0b3368ef57..3ef7efa6bdc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_oneof_with_empty_schema_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_oneof_with_empty_schema_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_oneof_with_empty_schema_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py index dfbedc460cf..c126ae27da6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_oneof_with_required_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_oneof_with_required_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_oneof_with_required_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_oneof_with_required_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py index efd6de725bf..e86f7fd813e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_pattern_is_not_anchored_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_pattern_is_not_anchored_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_pattern_is_not_anchored_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py index ebabf48556b..b4401076481 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_pattern_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_pattern_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_pattern_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_pattern_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py index 1fcca6e060f..383c2ad2171 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_properties_with_escaped_characters_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_properties_with_escaped_characters_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_properties_with_escaped_characters_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py index a3dc45fc6ca..47331dadd88 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_t server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py index 4157cad5e07..dac6eb7f72e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_ref_in_additionalproperties_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_ref_in_additionalproperties_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_additionalproperties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_additionalproperties_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py index 2db8515f79e..61871162d32 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_ref_in_allof_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_ref_in_allof_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_allof_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py index 2ec7273f5c7..d586833876b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_ref_in_anyof_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_ref_in_anyof_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_anyof_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py index 34864867dd6..f8a40f632f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_ref_in_items_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_ref_in_items_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_items_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py index 9c7d89417cf..47df48c77a4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_ref_in_not_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_ref_in_not_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_not_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py index 5155521d46c..49ccac7a947 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_ref_in_oneof_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_ref_in_oneof_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_oneof_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py index 71379c24127..695b07d78a1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_ref_in_property_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_ref_in_property_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_ref_in_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_ref_in_property_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py index 3b77d4beb70..e4432c346cd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_required_default_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_required_default_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_required_default_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_required_default_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py index 938426073e7..747292a2d2c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_required_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_required_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_required_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_required_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py index c9494f32078..a05e45d5ed1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_required_with_empty_array_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_required_with_empty_array_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_required_with_empty_array_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py index c11cab870b0..5249a1f02cc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_required_with_escaped_characters_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_required_with_escaped_characters_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_required_with_escaped_characters_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py index 7f2be08ef37..38066002f2f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_simple_enum_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_simple_enum_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_simple_enum_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py index 3255d234299..89dd5c321d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_string_type_matches_strings_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_string_type_matches_strings_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_string_type_matches_strings_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/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/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/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/operation.py index dc44e799404..1d1a5766c21 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/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/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/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/operation.py @@ -35,39 +35,26 @@ def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_re server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.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, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.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, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py index f840fc7ae37..890a6b1f810 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_uniqueitems_false_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_uniqueitems_false_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uniqueitems_false_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py index ef987935ab6..23ec10d966b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_uniqueitems_validation_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_uniqueitems_validation_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uniqueitems_validation_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py index 40a23bea3d9..1f72555f9a5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_uri_format_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_uri_format_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uri_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uri_format_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py index a7443aec462..79fa1453c77 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_uri_reference_format_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_uri_reference_format_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uri_reference_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uri_reference_format_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py index 6b9c74205fa..47b32268aa8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post/operation.py @@ -35,39 +35,26 @@ def _post_uri_template_format_response_body_for_content_types( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_uri_template_format_response_body_for_content_types( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_uri_template_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_uri_template_format_response_body_for_content_types( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -95,9 +82,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/rest.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/rest.py index 587175cba04..311ff019582 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/rest.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/rest.py @@ -14,6 +14,7 @@ import certifi import urllib3 +from urllib3 import fields from urllib3 import exceptions as urllib3_exceptions from urllib3._collections import HTTPHeaderDict @@ -21,6 +22,24 @@ logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ class RESTClientObject(object): @@ -90,7 +109,7 @@ def request( method: str, url: str, headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, body: typing.Optional[typing.Union[str, bytes]] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/schemas.py index 4c139d1a6c4..246bfae8fd6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/src/unit_test_api/schemas.py @@ -2104,10 +2104,10 @@ class Schema_: types = {tuple} @classmethod - def from_openapi_data_(cls, arg: typing.List[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): + def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: + def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: return super().__new__(cls, arg_, **kwargs) diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_client.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_client.py index 691ad4462a9..a31aad6b161 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_client.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_client.py @@ -31,13 +31,6 @@ from this_package.configurations import api_configuration, schema_configuration as schema_configuration_ -class RequestField(fields.RequestField): - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - class JSONEncoder(json.JSONEncoder): compact_separators = (',', ':') @@ -773,7 +766,10 @@ def serialize( class TypedDictInputVerifier: @staticmethod - def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict], data: typing.Mapping[str, typing.Any]): + def _verify_typed_dict_inputs( + tdict_cls: typing.Type[typing_extensions.TypedDict], + data: typing.Optional[typing.Mapping[str, typing.Any]] + ): """ Ensures that: - required keys are present @@ -784,7 +780,7 @@ def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict missing_required_keys = [] required_keys_with_unset_values = [] for required_key in tdict_cls.__required_keys__: - if required_key not in data: + if data is None or required_key not in data: missing_required_keys.append(required_key) continue value = data[required_key] @@ -804,10 +800,11 @@ def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict ) disallowed_additional_keys = [] - for key in data: - if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) + if data is not None: + for key in data: + if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) if disallowed_additional_keys: raise exceptions.ApiTypeError( '{} got {} unexpected keyword arguments: {}'.format( @@ -1022,7 +1019,7 @@ def call_api( host: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1092,7 +1089,7 @@ def request( method: str, url: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, body: typing.Union[str, bytes, None] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1191,9 +1188,9 @@ class Api(TypedDictInputVerifier): def _get_used_path( used_path: str, path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + path_params: typing.Optional[typing_extensions.TypedDict] = None, query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None + query_params: typing.Optional[typing_extensions.TypedDict] = None ) -> str: used_path_params = {} if path_params is not None: @@ -1201,6 +1198,7 @@ def _get_used_path( parameter_data = path_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) used_path_params.update(serialized_data) @@ -1215,6 +1213,7 @@ def _get_used_path( continue if prefix_separator_iterator is None: prefix_separator_iterator = parameter.get_prefix_separator_iterator() + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value @@ -1223,7 +1222,7 @@ def _get_used_path( @staticmethod def _get_headers( header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + header_params: typing.Optional[typing_extensions.TypedDict] = None, accept_content_types: typing.Tuple[str, ...] = (), ) -> _collections.HTTPHeaderDict: headers = _collections.HTTPHeaderDict() @@ -1232,6 +1231,7 @@ def _get_headers( parameter_data = header_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) headers.extend(serialized_data) if accept_content_types: @@ -1241,7 +1241,7 @@ def _get_headers( @staticmethod def _get_fields_and_body( - request_body: 'RequestBody', + request_body: typing.Type[RequestBody], body: typing.Any, headers: _collections.HTTPHeaderDict, content_type: str @@ -1273,7 +1273,7 @@ def _verify_response_status(response: api_response.ApiResponse): class SerializedRequestBody(typing_extensions.TypedDict, total=False): body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] + fields: typing.Tuple[rest.RequestField, ...] class RequestBody(StyleFormSerializer, JSONDetector): @@ -1309,24 +1309,24 @@ def __serialize_text_plain(in_data: typing.Any) -> SerializedRequestBody: return {'body': str(in_data)} @classmethod - def __multipart_json_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_json_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: json_value = cls.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) request_field.make_multipart(content_type='application/json') return request_field @classmethod - def __multipart_form_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_form_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: if isinstance(value, str): - request_field = RequestField(name=key, data=str(value)) + request_field = rest.RequestField(name=key, data=str(value)) request_field.make_multipart(content_type='text/plain') elif isinstance(value, bytes): - request_field = RequestField(name=key, data=value) + request_field = rest.RequestField(name=key, data=value) request_field.make_multipart(content_type='application/octet-stream') elif isinstance(value, schemas.FileIO): # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(RequestField, request_field) + request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, request_field) value.close() else: request_field = cls.__multipart_json_item(key=key, value=value) @@ -1355,7 +1355,7 @@ def __serialize_multipart_form_data( for key, value in in_data.items(): if isinstance(value, tuple): if value: - # values use explode = True, so the code makes a RequestField for each item with name=key + # values use explode = True, so the code makes a rest.RequestField for each item with name=key for item in value: request_field = cls.__multipart_form_item(key=key, value=item) fields.append(request_field) diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_response.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_response.py index 9b582efcf31..7e852d5bb81 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_response.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/api_response.py @@ -25,5 +25,5 @@ class ApiResponse: @dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.Schema] = schemas.unset - headers: typing.Union[schemas.Unset, typing_extensions.TypedDict] = schemas.unset + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/addition_operator.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/addition_operator.py index e8f5d9fc79c..29b44792834 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/addition_operator.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/addition_operator.py @@ -86,9 +86,22 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - a: typing.Union[Schema_.Properties.A, decimal.Decimal, int, float], - b: typing.Union[Schema_.Properties.B, decimal.Decimal, int, float], - operator_id: typing.Union[Schema_.Properties.OperatorId, str], + a: typing.Union[ + Schema_.Properties.A[decimal.Decimal], + decimal.Decimal, + int, + float + ], + b: typing.Union[ + Schema_.Properties.B[decimal.Decimal], + decimal.Decimal, + int, + float + ], + operator_id: typing.Union[ + Schema_.Properties.OperatorId[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> AdditionOperator[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/operator.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/operator.py index fa3d3721679..17a7b302fd6 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/operator.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/operator.py @@ -52,9 +52,44 @@ def _1() -> typing.Type[subtraction_operator.SubtractionOperator]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Operator[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/subtraction_operator.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/subtraction_operator.py index 3d3689d3d5e..213e5860569 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/subtraction_operator.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/components/schema/subtraction_operator.py @@ -86,9 +86,22 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - a: typing.Union[Schema_.Properties.A, decimal.Decimal, int, float], - b: typing.Union[Schema_.Properties.B, decimal.Decimal, int, float], - operator_id: typing.Union[Schema_.Properties.OperatorId, str], + a: typing.Union[ + Schema_.Properties.A[decimal.Decimal], + decimal.Decimal, + int, + float + ], + b: typing.Union[ + Schema_.Properties.B[decimal.Decimal], + decimal.Decimal, + int, + float + ], + operator_id: typing.Union[ + Schema_.Properties.OperatorId[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> SubtractionOperator[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/paths/operators/post/operation.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/paths/operators/post/operation.py index 057eae36f1b..166c5425f2e 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/paths/operators/post/operation.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/paths/operators/post/operation.py @@ -28,7 +28,6 @@ class BaseApi(api_client.Api): @typing.overload def _post_operators( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -49,48 +48,16 @@ def _post_operators( io.FileIO, io.BufferedReader ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _post_operators( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _post_operators( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -111,47 +78,15 @@ def _post_operators( io.FileIO, io.BufferedReader ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _post_operators( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _post_operators( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -172,10 +107,11 @@ def _post_operators( io.FileIO, io.BufferedReader ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -212,9 +148,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/paths/operators/post/request_body/__init__.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/paths/operators/post/request_body/__init__.py index 80375b49277..d872a69b392 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/paths/operators/post/request_body/__init__.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/paths/operators/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/rest.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/rest.py index f573720c2c1..ddb2b0398df 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/rest.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/rest.py @@ -14,6 +14,7 @@ import certifi import urllib3 +from urllib3 import fields from urllib3 import exceptions as urllib3_exceptions from urllib3._collections import HTTPHeaderDict @@ -21,6 +22,24 @@ logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ class RESTClientObject(object): @@ -90,7 +109,7 @@ def request( method: str, url: str, headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, body: typing.Optional[typing.Union[str, bytes]] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, diff --git a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py index 1271f165f40..83723f9f597 100644 --- a/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py +++ b/samples/openapi3/client/features/nonCompliantUseDiscriminatorIfCompositionFails/python/src/this_package/schemas.py @@ -2180,10 +2180,10 @@ class Schema_: types = {tuple} @classmethod - def from_openapi_data_(cls, arg: typing.List[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): + def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: + def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: return super().__new__(cls, arg_, **kwargs) diff --git a/samples/openapi3/client/features/security/python/src/this_package/api_client.py b/samples/openapi3/client/features/security/python/src/this_package/api_client.py index 2194c890518..0d6dec316d3 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/api_client.py +++ b/samples/openapi3/client/features/security/python/src/this_package/api_client.py @@ -31,13 +31,6 @@ from this_package.configurations import api_configuration, schema_configuration as schema_configuration_ -class RequestField(fields.RequestField): - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - class JSONEncoder(json.JSONEncoder): compact_separators = (',', ':') @@ -773,7 +766,10 @@ def serialize( class TypedDictInputVerifier: @staticmethod - def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict], data: typing.Mapping[str, typing.Any]): + def _verify_typed_dict_inputs( + tdict_cls: typing.Type[typing_extensions.TypedDict], + data: typing.Optional[typing.Mapping[str, typing.Any]] + ): """ Ensures that: - required keys are present @@ -784,7 +780,7 @@ def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict missing_required_keys = [] required_keys_with_unset_values = [] for required_key in tdict_cls.__required_keys__: - if required_key not in data: + if data is None or required_key not in data: missing_required_keys.append(required_key) continue value = data[required_key] @@ -804,10 +800,11 @@ def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict ) disallowed_additional_keys = [] - for key in data: - if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) + if data is not None: + for key in data: + if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) if disallowed_additional_keys: raise exceptions.ApiTypeError( '{} got {} unexpected keyword arguments: {}'.format( @@ -1022,7 +1019,7 @@ def call_api( host: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1092,7 +1089,7 @@ def request( method: str, url: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, body: typing.Union[str, bytes, None] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1191,9 +1188,9 @@ class Api(TypedDictInputVerifier): def _get_used_path( used_path: str, path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + path_params: typing.Optional[typing_extensions.TypedDict] = None, query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None + query_params: typing.Optional[typing_extensions.TypedDict] = None ) -> str: used_path_params = {} if path_params is not None: @@ -1201,6 +1198,7 @@ def _get_used_path( parameter_data = path_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) used_path_params.update(serialized_data) @@ -1215,6 +1213,7 @@ def _get_used_path( continue if prefix_separator_iterator is None: prefix_separator_iterator = parameter.get_prefix_separator_iterator() + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value @@ -1223,7 +1222,7 @@ def _get_used_path( @staticmethod def _get_headers( header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + header_params: typing.Optional[typing_extensions.TypedDict] = None, accept_content_types: typing.Tuple[str, ...] = (), ) -> _collections.HTTPHeaderDict: headers = _collections.HTTPHeaderDict() @@ -1232,6 +1231,7 @@ def _get_headers( parameter_data = header_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) headers.extend(serialized_data) if accept_content_types: @@ -1241,7 +1241,7 @@ def _get_headers( @staticmethod def _get_fields_and_body( - request_body: 'RequestBody', + request_body: typing.Type[RequestBody], body: typing.Any, headers: _collections.HTTPHeaderDict, content_type: str @@ -1273,7 +1273,7 @@ def _verify_response_status(response: api_response.ApiResponse): class SerializedRequestBody(typing_extensions.TypedDict, total=False): body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] + fields: typing.Tuple[rest.RequestField, ...] class RequestBody(StyleFormSerializer, JSONDetector): @@ -1309,24 +1309,24 @@ def __serialize_text_plain(in_data: typing.Any) -> SerializedRequestBody: return {'body': str(in_data)} @classmethod - def __multipart_json_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_json_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: json_value = cls.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) request_field.make_multipart(content_type='application/json') return request_field @classmethod - def __multipart_form_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_form_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: if isinstance(value, str): - request_field = RequestField(name=key, data=str(value)) + request_field = rest.RequestField(name=key, data=str(value)) request_field.make_multipart(content_type='text/plain') elif isinstance(value, bytes): - request_field = RequestField(name=key, data=value) + request_field = rest.RequestField(name=key, data=value) request_field.make_multipart(content_type='application/octet-stream') elif isinstance(value, schemas.FileIO): # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(RequestField, request_field) + request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, request_field) value.close() else: request_field = cls.__multipart_json_item(key=key, value=value) @@ -1355,7 +1355,7 @@ def __serialize_multipart_form_data( for key, value in in_data.items(): if isinstance(value, tuple): if value: - # values use explode = True, so the code makes a RequestField for each item with name=key + # values use explode = True, so the code makes a rest.RequestField for each item with name=key for item in value: request_field = cls.__multipart_form_item(key=key, value=item) fields.append(request_field) diff --git a/samples/openapi3/client/features/security/python/src/this_package/api_response.py b/samples/openapi3/client/features/security/python/src/this_package/api_response.py index 767d6ac686f..260cdd947a2 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/api_response.py +++ b/samples/openapi3/client/features/security/python/src/this_package/api_response.py @@ -25,5 +25,5 @@ class ApiResponse: @dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.Schema] = schemas.unset - headers: typing.Union[schemas.Unset, typing_extensions.TypedDict] = schemas.unset + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_no_explicit_security/get/operation.py b/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_no_explicit_security/get/operation.py index 530cf5fad5f..3148b7a03db 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_no_explicit_security/get/operation.py +++ b/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_no_explicit_security/get/operation.py @@ -30,36 +30,24 @@ def _path_with_no_explicit_security( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _path_with_no_explicit_security( self, - skip_deserialization: typing_extensions.Literal[True], server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _path_with_no_explicit_security( - self, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _path_with_no_explicit_security( self, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ path with no explicit security @@ -86,9 +74,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_one_explicit_security/get/operation.py b/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_one_explicit_security/get/operation.py index dcc08b81588..e0a47e60a2c 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_one_explicit_security/get/operation.py +++ b/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_one_explicit_security/get/operation.py @@ -36,39 +36,26 @@ def _path_with_one_explicit_security( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _path_with_one_explicit_security( self, - skip_deserialization: typing_extensions.Literal[True], security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _path_with_one_explicit_security( - self, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _path_with_one_explicit_security( self, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ path with one explicit security @@ -101,9 +88,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_security_from_root/get/operation.py b/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_security_from_root/get/operation.py index aa5d638f294..4e019c9c9da 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_security_from_root/get/operation.py +++ b/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_security_from_root/get/operation.py @@ -44,39 +44,26 @@ def _path_with_security_from_root( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _path_with_security_from_root( self, - skip_deserialization: typing_extensions.Literal[True], security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _path_with_security_from_root( - self, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _path_with_security_from_root( self, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ path with security from root @@ -109,9 +96,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_two_explicit_security/get/operation.py b/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_two_explicit_security/get/operation.py index 849934613dd..030137c12dd 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_two_explicit_security/get/operation.py +++ b/samples/openapi3/client/features/security/python/src/this_package/paths/path_with_two_explicit_security/get/operation.py @@ -40,39 +40,26 @@ def _path_with_two_explicit_security( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _path_with_two_explicit_security( self, - skip_deserialization: typing_extensions.Literal[True], security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _path_with_two_explicit_security( - self, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _path_with_two_explicit_security( self, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ path with two explicit security @@ -105,9 +92,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/features/security/python/src/this_package/rest.py b/samples/openapi3/client/features/security/python/src/this_package/rest.py index 51322f11e03..877cedd4a57 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/rest.py +++ b/samples/openapi3/client/features/security/python/src/this_package/rest.py @@ -14,6 +14,7 @@ import certifi import urllib3 +from urllib3 import fields from urllib3 import exceptions as urllib3_exceptions from urllib3._collections import HTTPHeaderDict @@ -21,6 +22,24 @@ logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ class RESTClientObject(object): @@ -90,7 +109,7 @@ def request( method: str, url: str, headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, body: typing.Optional[typing.Union[str, bytes]] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, diff --git a/samples/openapi3/client/features/security/python/src/this_package/schemas.py b/samples/openapi3/client/features/security/python/src/this_package/schemas.py index c6ea1ed307c..afdbd92be28 100644 --- a/samples/openapi3/client/features/security/python/src/this_package/schemas.py +++ b/samples/openapi3/client/features/security/python/src/this_package/schemas.py @@ -2104,10 +2104,10 @@ class Schema_: types = {tuple} @classmethod - def from_openapi_data_(cls, arg: typing.List[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): + def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: + def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: return super().__new__(cls, arg_, **kwargs) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py index 53b5ae918e9..0fce536bbc3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/api_client.py @@ -31,13 +31,6 @@ from petstore_api.configurations import api_configuration, schema_configuration as schema_configuration_ -class RequestField(fields.RequestField): - def __eq__(self, other): - if not isinstance(other, fields.RequestField): - return False - return self.__dict__ == other.__dict__ - - class JSONEncoder(json.JSONEncoder): compact_separators = (',', ':') @@ -773,7 +766,10 @@ def serialize( class TypedDictInputVerifier: @staticmethod - def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict], data: typing.Mapping[str, typing.Any]): + def _verify_typed_dict_inputs( + tdict_cls: typing.Type[typing_extensions.TypedDict], + data: typing.Optional[typing.Mapping[str, typing.Any]] + ): """ Ensures that: - required keys are present @@ -784,7 +780,7 @@ def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict missing_required_keys = [] required_keys_with_unset_values = [] for required_key in tdict_cls.__required_keys__: - if required_key not in data: + if data is None or required_key not in data: missing_required_keys.append(required_key) continue value = data[required_key] @@ -804,10 +800,11 @@ def _verify_typed_dict_inputs(tdict_cls: typing.Type[typing_extensions.TypedDict ) disallowed_additional_keys = [] - for key in data: - if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) + if data is not None: + for key in data: + if key in tdict_cls.__required_keys__ or key in tdict_cls.__optional_keys__: + continue + disallowed_additional_keys.append(key) if disallowed_additional_keys: raise exceptions.ApiTypeError( '{} got {} unexpected keyword arguments: {}'.format( @@ -1022,7 +1019,7 @@ def call_api( host: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, body: typing.Union[str, bytes, None] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, security_requirement_object: typing.Optional[security_schemes.SecurityRequirementObject] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1092,7 +1089,7 @@ def request( method: str, url: str, headers: typing.Optional[_collections.HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, body: typing.Union[str, bytes, None] = None, stream: bool = False, timeout: typing.Union[int, float, typing.Tuple, None] = None, @@ -1191,9 +1188,9 @@ class Api(TypedDictInputVerifier): def _get_used_path( used_path: str, path_parameters: typing.Tuple[typing.Type[PathParameter], ...] = (), - path_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + path_params: typing.Optional[typing_extensions.TypedDict] = None, query_parameters: typing.Tuple[typing.Type[QueryParameter], ...] = (), - query_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None + query_params: typing.Optional[typing_extensions.TypedDict] = None ) -> str: used_path_params = {} if path_params is not None: @@ -1201,6 +1198,7 @@ def _get_used_path( parameter_data = path_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) used_path_params.update(serialized_data) @@ -1215,6 +1213,7 @@ def _get_used_path( continue if prefix_separator_iterator is None: prefix_separator_iterator = parameter.get_prefix_separator_iterator() + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value @@ -1223,7 +1222,7 @@ def _get_used_path( @staticmethod def _get_headers( header_parameters: typing.Tuple[typing.Type[HeaderParameter], ...] = (), - header_params: typing.Optional[typing.Dict[str, _SERIALIZE_TYPES]] = None, + header_params: typing.Optional[typing_extensions.TypedDict] = None, accept_content_types: typing.Tuple[str, ...] = (), ) -> _collections.HTTPHeaderDict: headers = _collections.HTTPHeaderDict() @@ -1232,6 +1231,7 @@ def _get_headers( parameter_data = header_params.get(parameter.name, schemas.unset) if isinstance(parameter_data, schemas.Unset): continue + parameter_data = typing.cast(_SERIALIZE_TYPES, parameter_data) serialized_data = parameter.serialize(parameter_data) headers.extend(serialized_data) if accept_content_types: @@ -1241,7 +1241,7 @@ def _get_headers( @staticmethod def _get_fields_and_body( - request_body: 'RequestBody', + request_body: typing.Type[RequestBody], body: typing.Any, headers: _collections.HTTPHeaderDict, content_type: str @@ -1273,7 +1273,7 @@ def _verify_response_status(response: api_response.ApiResponse): class SerializedRequestBody(typing_extensions.TypedDict, total=False): body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] + fields: typing.Tuple[rest.RequestField, ...] class RequestBody(StyleFormSerializer, JSONDetector): @@ -1309,24 +1309,24 @@ def __serialize_text_plain(in_data: typing.Any) -> SerializedRequestBody: return {'body': str(in_data)} @classmethod - def __multipart_json_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_json_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: json_value = cls.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) + request_field = rest.RequestField(name=key, data=json.dumps(json_value)) request_field.make_multipart(content_type='application/json') return request_field @classmethod - def __multipart_form_item(cls, key: str, value: schemas.Schema) -> RequestField: + def __multipart_form_item(cls, key: str, value: schemas.Schema) -> rest.RequestField: if isinstance(value, str): - request_field = RequestField(name=key, data=str(value)) + request_field = rest.RequestField(name=key, data=str(value)) request_field.make_multipart(content_type='text/plain') elif isinstance(value, bytes): - request_field = RequestField(name=key, data=value) + request_field = rest.RequestField(name=key, data=value) request_field.make_multipart(content_type='application/octet-stream') elif isinstance(value, schemas.FileIO): # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) - request_field = typing.cast(RequestField, request_field) + request_field = rest.RequestField.from_tuples(key, (os.path.basename(str(value.name)), value.read())) + request_field = typing.cast(rest.RequestField, request_field) value.close() else: request_field = cls.__multipart_json_item(key=key, value=value) @@ -1355,7 +1355,7 @@ def __serialize_multipart_form_data( for key, value in in_data.items(): if isinstance(value, tuple): if value: - # values use explode = True, so the code makes a RequestField for each item with name=key + # values use explode = True, so the code makes a rest.RequestField for each item with name=key for item in value: request_field = cls.__multipart_form_item(key=key, value=item) fields.append(request_field) diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/api_response.py index b3fb55a4b46..bea8ee109de 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/api_response.py @@ -25,5 +25,5 @@ class ApiResponse: @dataclasses.dataclass class ApiResponseWithoutDeserialization(ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[schemas.Unset, schemas.Schema] = schemas.unset - headers: typing.Union[schemas.Unset, typing_extensions.TypedDict] = schemas.unset + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_client/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_client/__init__.py index 96beb72bd07..5a770ef82cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_client/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_client/__init__.py @@ -12,7 +12,7 @@ class Client(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_pet/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_pet/__init__.py index b06d82702c6..476b0442906 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_pet/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_pet/__init__.py @@ -13,11 +13,11 @@ class Pet(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] class ApplicationXmlMediaType(api_client.MediaType): - schema: typing.Type[application_xml_schema.Schema] = application_xml_schema.Schema + schema: typing_extensions.TypeAlias = application_xml_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/__init__.py index b9e78ef501d..abe74b483ff 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/__init__.py @@ -12,7 +12,7 @@ class UserArray(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[tuple] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py index 881ce8b1f83..bf33d2594d7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/request_bodies/request_body_user_array/content/application_json/schema.py @@ -25,13 +25,12 @@ def items() -> typing.Type[user.User]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['user.User', dict, frozendict.frozendict], ... - ], - typing.List[ - typing.Union['user.User', dict, frozendict.frozendict] - ], + arg_: typing.Sequence[ + typing.Union[ + user.User[frozendict.frozendict], + dict, + frozendict.frozendict + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py index 47eae4cfb36..ba5df782e33 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_success_inline_content_and_header/content/application_json/schema.py @@ -28,7 +28,11 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, decimal.Decimal, int], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[decimal.Decimal], + decimal.Decimal, + int + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py index e7a4dba96fe..4c3448a28c3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_json/schema.py @@ -25,13 +25,12 @@ def items() -> typing.Type[ref_pet.RefPet]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['ref_pet.RefPet', dict, frozendict.frozendict], ... - ], - typing.List[ - typing.Union['ref_pet.RefPet', dict, frozendict.frozendict] - ], + arg_: typing.Sequence[ + typing.Union[ + ref_pet.RefPet[frozendict.frozendict], + dict, + frozendict.frozendict + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py index 0d160304b24..a9277849475 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/responses/response_successful_xml_and_json_array_of_pet/content/application_xml/schema.py @@ -25,13 +25,12 @@ def items() -> typing.Type[pet.Pet]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['pet.Pet', dict, frozendict.frozendict], ... - ], - typing.List[ - typing.Union['pet.Pet', dict, frozendict.frozendict] - ], + arg_: typing.Sequence[ + typing.Union[ + pet.Pet[frozendict.frozendict], + dict, + frozendict.frozendict + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py index 0859aed07cc..04c09917ad2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_200_response.py @@ -66,10 +66,50 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - name: typing.Union[Schema_.Properties.Name, decimal.Decimal, int, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + name: typing.Union[ + Schema_.Properties.Name[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> _200Response[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py index 23319cf016f..214ad473f0c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/_return.py @@ -60,9 +60,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> _Return[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py index adb18fa582a..c5215da4bc5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/abstract_step_message.py @@ -141,11 +141,86 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - description: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - discriminator: typing.Union[Schema_.Properties.Discriminator, str], - sequenceNumber: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + description: typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + discriminator: typing.Union[ + Schema_.Properties.Discriminator[str], + str + ], + sequenceNumber: typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AbstractStepMessage[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py index 0c860826e0e..adb7a45c29f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_class.py @@ -44,7 +44,10 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, str], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[str], + str + ], ) -> AdditionalPropertiesClass.Schema_.Properties.MapProperty[frozendict.frozendict]: inst = super().__new__( cls, @@ -85,7 +88,10 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, str], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[str], + str + ], ) -> AdditionalPropertiesClass.Schema_.Properties.MapOfMapProperty.Schema_.AdditionalProperties[frozendict.frozendict]: inst = super().__new__( cls, @@ -107,7 +113,11 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[frozendict.frozendict], + dict, + frozendict.frozendict + ], ) -> AdditionalPropertiesClass.Schema_.Properties.MapOfMapProperty[frozendict.frozendict]: inst = super().__new__( cls, @@ -151,7 +161,34 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], ) -> AdditionalPropertiesClass.Schema_.Properties.MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict]: inst = super().__new__( cls, @@ -209,7 +246,10 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, str], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[str], + str + ], ) -> AdditionalPropertiesClass.Schema_.Properties.MapWithUndeclaredPropertiesString[frozendict.frozendict]: inst = super().__new__( cls, @@ -298,16 +338,97 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - map_property: typing.Union[Schema_.Properties.MapProperty, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_of_map_property: typing.Union[Schema_.Properties.MapOfMapProperty, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - anytype_1: typing.Union[Schema_.Properties.Anytype1, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_anytype_1: typing.Union[Schema_.Properties.MapWithUndeclaredPropertiesAnytype1, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_anytype_2: typing.Union[Schema_.Properties.MapWithUndeclaredPropertiesAnytype2, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_anytype_3: typing.Union[Schema_.Properties.MapWithUndeclaredPropertiesAnytype3, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - empty_map: typing.Union[Schema_.Properties.EmptyMap, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_string: typing.Union[Schema_.Properties.MapWithUndeclaredPropertiesString, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + map_property: typing.Union[ + Schema_.Properties.MapProperty[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + map_of_map_property: typing.Union[ + Schema_.Properties.MapOfMapProperty[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + anytype_1: typing.Union[ + Schema_.Properties.Anytype1[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + map_with_undeclared_properties_anytype_1: typing.Union[ + Schema_.Properties.MapWithUndeclaredPropertiesAnytype1[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + map_with_undeclared_properties_anytype_2: typing.Union[ + Schema_.Properties.MapWithUndeclaredPropertiesAnytype2[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + map_with_undeclared_properties_anytype_3: typing.Union[ + Schema_.Properties.MapWithUndeclaredPropertiesAnytype3[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + empty_map: typing.Union[ + Schema_.Properties.EmptyMap[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + map_with_undeclared_properties_string: typing.Union[ + Schema_.Properties.MapWithUndeclaredPropertiesString[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AdditionalPropertiesClass[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py index 0ac388fe62d..9970c8353c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_validator.py @@ -55,7 +55,34 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], ) -> AdditionalPropertiesValidator.Schema_.AllOf._0[frozendict.frozendict]: inst = super().__new__( cls, @@ -91,9 +118,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AdditionalPropertiesValidator.Schema_.AllOf._1.Schema_.AdditionalProperties[ typing.Union[ frozendict.frozendict, @@ -146,7 +208,34 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], ) -> AdditionalPropertiesValidator.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -182,9 +271,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AdditionalPropertiesValidator.Schema_.AllOf._2.Schema_.AdditionalProperties[ typing.Union[ frozendict.frozendict, @@ -237,7 +361,34 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], ) -> AdditionalPropertiesValidator.Schema_.AllOf._2[frozendict.frozendict]: inst = super().__new__( cls, @@ -261,7 +412,25 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AdditionalPropertiesValidator[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py index e18fa1ff3f6..d74a9ac6d23 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/additional_properties_with_array_of_enums.py @@ -39,13 +39,11 @@ def items() -> typing.Type[enum_class.EnumClass]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['enum_class.EnumClass', str], ... - ], - typing.List[ - typing.Union['enum_class.EnumClass', str] - ], + arg_: typing.Sequence[ + typing.Union[ + enum_class.EnumClass[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> AdditionalPropertiesWithArrayOfEnums.Schema_.AdditionalProperties[tuple]: @@ -71,7 +69,11 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, list, tuple], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[tuple], + list, + tuple + ], ) -> AdditionalPropertiesWithArrayOfEnums[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py index f2696b5c681..5b8b02658fc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/address.py @@ -33,7 +33,11 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, decimal.Decimal, int], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[decimal.Decimal], + decimal.Decimal, + int + ], ) -> Address[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py index e74b67ab145..a8fa24bc5e2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal.py @@ -91,10 +91,35 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - className: typing.Union[Schema_.Properties.ClassName, str], - color: typing.Union[Schema_.Properties.Color, str, schemas.Unset] = schemas.unset, + className: typing.Union[ + Schema_.Properties.ClassName[str], + str + ], + color: typing.Union[ + Schema_.Properties.Color[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Animal[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py index 365dba3b6cd..e85cf9f254a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/animal_farm.py @@ -30,13 +30,12 @@ def items() -> typing.Type[animal.Animal]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['animal.Animal', dict, frozendict.frozendict], ... - ], - typing.List[ - typing.Union['animal.Animal', dict, frozendict.frozendict] - ], + arg_: typing.Sequence[ + typing.Union[ + animal.Animal[frozendict.frozendict], + dict, + frozendict.frozendict + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> AnimalFarm[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py index 8b579d13a43..5bf7aaafe36 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_and_format.py @@ -40,9 +40,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat.Schema_.Properties.Uuid[ typing.Union[ frozendict.frozendict, @@ -92,9 +127,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat.Schema_.Properties.Date[ typing.Union[ frozendict.frozendict, @@ -144,9 +214,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat.Schema_.Properties.DateTime[ typing.Union[ frozendict.frozendict, @@ -196,9 +301,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat.Schema_.Properties.Number[ typing.Union[ frozendict.frozendict, @@ -247,9 +387,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat.Schema_.Properties.Binary[ typing.Union[ frozendict.frozendict, @@ -298,9 +473,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat.Schema_.Properties.Int32[ typing.Union[ frozendict.frozendict, @@ -349,9 +559,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat.Schema_.Properties.Int64[ typing.Union[ frozendict.frozendict, @@ -400,9 +645,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat.Schema_.Properties.Double[ typing.Union[ frozendict.frozendict, @@ -451,9 +731,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat.Schema_.Properties._Float[ typing.Union[ frozendict.frozendict, @@ -641,15 +956,229 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - uuid: typing.Union[Schema_.Properties.Uuid, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - date: typing.Union[Schema_.Properties.Date, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - number: typing.Union[Schema_.Properties.Number, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - binary: typing.Union[Schema_.Properties.Binary, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - int32: typing.Union[Schema_.Properties.Int32, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - int64: typing.Union[Schema_.Properties.Int64, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - double: typing.Union[Schema_.Properties.Double, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + uuid: typing.Union[ + Schema_.Properties.Uuid[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + date: typing.Union[ + Schema_.Properties.Date[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + number: typing.Union[ + Schema_.Properties.Number[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + binary: typing.Union[ + Schema_.Properties.Binary[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + int32: typing.Union[ + Schema_.Properties.Int32[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + int64: typing.Union[ + Schema_.Properties.Int64[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + double: typing.Union[ + Schema_.Properties.Double[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeAndFormat[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py index ad8d85cd0b5..db81e53f39c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/any_type_not_string.py @@ -28,9 +28,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> AnyTypeNotString[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py index bce5280b077..85f679d09b8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/api_response.py @@ -70,11 +70,42 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - code: typing.Union[Schema_.Properties.Code, decimal.Decimal, int, schemas.Unset] = schemas.unset, - type: typing.Union[Schema_.Properties.Type, str, schemas.Unset] = schemas.unset, - message: typing.Union[Schema_.Properties.Message, str, schemas.Unset] = schemas.unset, + code: typing.Union[ + Schema_.Properties.Code[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + type: typing.Union[ + Schema_.Properties.Type[str], + schemas.Unset, + str + ] = schemas.unset, + message: typing.Union[ + Schema_.Properties.Message[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ApiResponse[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py index 38001de6e3e..9563f71c04d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple.py @@ -104,10 +104,36 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[None, dict, frozendict.frozendict], - origin: typing.Union[Schema_.Properties.Origin, str, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + None, + dict, + frozendict.frozendict + ], + origin: typing.Union[ + Schema_.Properties.Origin[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Apple[ typing.Union[ schemas.NoneClass, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py index 9f325c3b4a9..56858d46e7c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/apple_req.py @@ -59,8 +59,15 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - cultivar: typing.Union[Schema_.Properties.Cultivar, str], - mealy: typing.Union[Schema_.Properties.Mealy, bool, schemas.Unset] = schemas.unset, + cultivar: typing.Union[ + Schema_.Properties.Cultivar[str], + str + ], + mealy: typing.Union[ + Schema_.Properties.Mealy[schemas.BoolClass], + schemas.Unset, + bool + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> AppleReq[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py index b308f65ddba..1ecb36b4793 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_holding_any_type.py @@ -27,13 +27,35 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], ... - ], - typing.List[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayHoldingAnyType[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py index 36ca83a1e14..7687d5d484d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_array_of_number_only.py @@ -47,13 +47,13 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, decimal.Decimal, int, float], ... - ], - typing.List[ - typing.Union[Schema_.Items, decimal.Decimal, int, float] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[decimal.Decimal], + decimal.Decimal, + int, + float + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayOfArrayOfNumberOnly.Schema_.Properties.ArrayArrayNumber.Schema_.Items[tuple]: @@ -73,13 +73,12 @@ def __getitem__(self, name: int) -> Schema_.Items[decimal.Decimal]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, list, tuple], ... - ], - typing.List[ - typing.Union[Schema_.Items, list, tuple] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[tuple], + list, + tuple + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayOfArrayOfNumberOnly.Schema_.Properties.ArrayArrayNumber[tuple]: @@ -128,9 +127,32 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - ArrayArrayNumber: typing.Union[Schema_.Properties.ArrayArrayNumber, list, tuple, schemas.Unset] = schemas.unset, + ArrayArrayNumber: typing.Union[ + Schema_.Properties.ArrayArrayNumber[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ArrayOfArrayOfNumberOnly[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py index 0150dcc59e6..bbffd4a0c55 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_enums.py @@ -30,13 +30,15 @@ def items() -> typing.Type[string_enum.StringEnum]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['string_enum.StringEnum', None, str], ... - ], - typing.List[ - typing.Union['string_enum.StringEnum', None, str] - ], + arg_: typing.Sequence[ + typing.Union[ + string_enum.StringEnum[typing.Union[ + schemas.NoneClass, + str + ]], + None, + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayOfEnums[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py index 0c34600da26..e6c70ced7d4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_of_number_only.py @@ -38,13 +38,13 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, decimal.Decimal, int, float], ... - ], - typing.List[ - typing.Union[Schema_.Items, decimal.Decimal, int, float] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[decimal.Decimal], + decimal.Decimal, + int, + float + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayOfNumberOnly.Schema_.Properties.ArrayNumber[tuple]: @@ -93,9 +93,32 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - ArrayNumber: typing.Union[Schema_.Properties.ArrayNumber, list, tuple, schemas.Unset] = schemas.unset, + ArrayNumber: typing.Union[ + Schema_.Properties.ArrayNumber[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ArrayOfNumberOnly[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py index bc6211a99d3..1fc7747f40e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_test.py @@ -38,13 +38,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayTest.Schema_.Properties.ArrayOfString[tuple]: @@ -83,13 +81,12 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, decimal.Decimal, int], ... - ], - typing.List[ - typing.Union[Schema_.Items, decimal.Decimal, int] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[decimal.Decimal], + decimal.Decimal, + int + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayTest.Schema_.Properties.ArrayArrayOfInteger.Schema_.Items[tuple]: @@ -109,13 +106,12 @@ def __getitem__(self, name: int) -> Schema_.Items[decimal.Decimal]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, list, tuple], ... - ], - typing.List[ - typing.Union[Schema_.Items, list, tuple] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[tuple], + list, + tuple + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayTest.Schema_.Properties.ArrayArrayOfInteger[tuple]: @@ -157,13 +153,12 @@ def items() -> typing.Type[read_only_first.ReadOnlyFirst]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['read_only_first.ReadOnlyFirst', dict, frozendict.frozendict], ... - ], - typing.List[ - typing.Union['read_only_first.ReadOnlyFirst', dict, frozendict.frozendict] - ], + arg_: typing.Sequence[ + typing.Union[ + read_only_first.ReadOnlyFirst[frozendict.frozendict], + dict, + frozendict.frozendict + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayTest.Schema_.Properties.ArrayArrayOfModel.Schema_.Items[tuple]: @@ -183,13 +178,12 @@ def __getitem__(self, name: int) -> read_only_first.ReadOnlyFirst[frozendict.fro def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, list, tuple], ... - ], - typing.List[ - typing.Union[Schema_.Items, list, tuple] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[tuple], + list, + tuple + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayTest.Schema_.Properties.ArrayArrayOfModel[tuple]: @@ -248,11 +242,44 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - array_of_string: typing.Union[Schema_.Properties.ArrayOfString, list, tuple, schemas.Unset] = schemas.unset, - array_array_of_integer: typing.Union[Schema_.Properties.ArrayArrayOfInteger, list, tuple, schemas.Unset] = schemas.unset, - array_array_of_model: typing.Union[Schema_.Properties.ArrayArrayOfModel, list, tuple, schemas.Unset] = schemas.unset, + array_of_string: typing.Union[ + Schema_.Properties.ArrayOfString[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, + array_array_of_integer: typing.Union[ + Schema_.Properties.ArrayArrayOfInteger[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, + array_array_of_model: typing.Union[ + Schema_.Properties.ArrayArrayOfModel[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ArrayTest[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py index da24e8832d4..76b7d6641e4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/array_with_validations_in_items.py @@ -40,13 +40,12 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, decimal.Decimal, int], ... - ], - typing.List[ - typing.Union[Schema_.Items, decimal.Decimal, int] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[decimal.Decimal], + decimal.Decimal, + int + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ArrayWithValidationsInItems[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py index 667bed6de9f..2183434680b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana.py @@ -65,9 +65,32 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - lengthCm: typing.Union[Schema_.Properties.LengthCm, decimal.Decimal, int, float], + lengthCm: typing.Union[ + Schema_.Properties.LengthCm[decimal.Decimal], + decimal.Decimal, + int, + float + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Banana[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py index f75a7e8a456..29dd3e22417 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/banana_req.py @@ -59,8 +59,17 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - lengthCm: typing.Union[Schema_.Properties.LengthCm, decimal.Decimal, int, float], - sweet: typing.Union[Schema_.Properties.Sweet, bool, schemas.Unset] = schemas.unset, + lengthCm: typing.Union[ + Schema_.Properties.LengthCm[decimal.Decimal], + decimal.Decimal, + int, + float + ], + sweet: typing.Union[ + Schema_.Properties.Sweet[schemas.BoolClass], + schemas.Unset, + bool + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> BananaReq[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py index 71111d577f5..4e81c76ce9b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/basque_pig.py @@ -82,9 +82,30 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - className: typing.Union[Schema_.Properties.ClassName, str], + className: typing.Union[ + Schema_.Properties.ClassName[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> BasquePig[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py index 7b8a816f695..3e4d5304bfd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/capitalization.py @@ -88,14 +88,56 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - smallCamel: typing.Union[Schema_.Properties.SmallCamel, str, schemas.Unset] = schemas.unset, - CapitalCamel: typing.Union[Schema_.Properties.CapitalCamel, str, schemas.Unset] = schemas.unset, - small_Snake: typing.Union[Schema_.Properties.SmallSnake, str, schemas.Unset] = schemas.unset, - Capital_Snake: typing.Union[Schema_.Properties.CapitalSnake, str, schemas.Unset] = schemas.unset, - SCA_ETH_Flow_Points: typing.Union[Schema_.Properties.SCAETHFlowPoints, str, schemas.Unset] = schemas.unset, - ATT_NAME: typing.Union[Schema_.Properties.ATTNAME, str, schemas.Unset] = schemas.unset, + smallCamel: typing.Union[ + Schema_.Properties.SmallCamel[str], + schemas.Unset, + str + ] = schemas.unset, + CapitalCamel: typing.Union[ + Schema_.Properties.CapitalCamel[str], + schemas.Unset, + str + ] = schemas.unset, + small_Snake: typing.Union[ + Schema_.Properties.SmallSnake[str], + schemas.Unset, + str + ] = schemas.unset, + Capital_Snake: typing.Union[ + Schema_.Properties.CapitalSnake[str], + schemas.Unset, + str + ] = schemas.unset, + SCA_ETH_Flow_Points: typing.Union[ + Schema_.Properties.SCAETHFlowPoints[str], + schemas.Unset, + str + ] = schemas.unset, + ATT_NAME: typing.Union[ + Schema_.Properties.ATTNAME[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Capitalization[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py index 7e0d305d90a..e32d9792f19 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/cat.py @@ -73,9 +73,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - declawed: typing.Union[Schema_.Properties.Declawed, bool, schemas.Unset] = schemas.unset, + declawed: typing.Union[ + Schema_.Properties.Declawed[schemas.BoolClass], + schemas.Unset, + bool + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Cat.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -97,9 +119,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Cat[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py index 0a741be4708..13a7d58a493 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/category.py @@ -82,10 +82,36 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - name: typing.Union[Schema_.Properties.Name, str], - id: typing.Union[Schema_.Properties.Id, decimal.Decimal, int, schemas.Unset] = schemas.unset, + name: typing.Union[ + Schema_.Properties.Name[str], + str + ], + id: typing.Union[ + Schema_.Properties.Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Category[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py index 71e5790ef36..27df325cc42 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/child_cat.py @@ -73,9 +73,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - name: typing.Union[Schema_.Properties.Name, str, schemas.Unset] = schemas.unset, + name: typing.Union[ + Schema_.Properties.Name[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ChildCat.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -97,9 +119,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ChildCat[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py index c3e9e470562..5084a186ce1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/class_model.py @@ -60,10 +60,49 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - _class: typing.Union[Schema_.Properties._Class, str, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + _class: typing.Union[ + Schema_.Properties._Class[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ClassModel[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py index 4874666c4de..e3721135298 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/client.py @@ -58,9 +58,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - client: typing.Union[Schema_.Properties.Client, str, schemas.Unset] = schemas.unset, + client: typing.Union[ + Schema_.Properties.Client[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Client[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py index c58f1fe9fa6..cf42295f8ca 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/complex_quadrilateral.py @@ -90,9 +90,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - quadrilateralType: typing.Union[Schema_.Properties.QuadrilateralType, str, schemas.Unset] = schemas.unset, + quadrilateralType: typing.Union[ + Schema_.Properties.QuadrilateralType[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ComplexQuadrilateral.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -114,9 +136,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ComplexQuadrilateral[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py index e372cd1e028..23093685bee 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_any_of_different_types_no_validations.py @@ -47,13 +47,35 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], ... - ], - typing.List[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ComposedAnyOfDifferentTypesNoValidations.Schema_.AnyOf._9[tuple]: @@ -107,9 +129,44 @@ def __getitem__(self, name: int) -> Schema_.Items[typing.Union[ def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ComposedAnyOfDifferentTypesNoValidations[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py index 8af2ac6fffe..455e4c96f2a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_array.py @@ -27,13 +27,35 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], ... - ], - typing.List[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ComposedArray[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py index bf042e49e77..e7c2701d1ae 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_object.py @@ -37,7 +37,25 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ComposedObject[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py index 38d628740a7..b5e73633fe7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/composed_one_of_different_types.py @@ -53,7 +53,25 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ComposedOneOfDifferentTypes.Schema_.OneOf._4[frozendict.frozendict]: inst = super().__new__( cls, @@ -81,13 +99,35 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], ... - ], - typing.List[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> ComposedOneOfDifferentTypes.Schema_.OneOf._5[tuple]: @@ -141,9 +181,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ComposedOneOfDifferentTypes[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py index bc8c1c9be2f..704fccd52fc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/danish_pig.py @@ -82,9 +82,30 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - className: typing.Union[Schema_.Properties.ClassName, str], + className: typing.Union[ + Schema_.Properties.ClassName[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> DanishPig[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py index b76da242f8e..7f41fb2da24 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/dog.py @@ -73,9 +73,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - breed: typing.Union[Schema_.Properties.Breed, str, schemas.Unset] = schemas.unset, + breed: typing.Union[ + Schema_.Properties.Breed[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Dog.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -97,9 +119,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Dog[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py index d132015aaa6..77d1f5dba17 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/drawing.py @@ -53,13 +53,35 @@ def items() -> typing.Type[shape.Shape]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['shape.Shape', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], ... - ], - typing.List[ - typing.Union['shape.Shape', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader] - ], + arg_: typing.Sequence[ + typing.Union[ + shape.Shape[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Drawing.Schema_.Properties.Shapes[tuple]: @@ -163,12 +185,128 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - mainShape: typing.Union['shape.Shape', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - shapeOrNull: typing.Union['shape_or_null.ShapeOrNull', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - nullableShape: typing.Union['nullable_shape.NullableShape', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - shapes: typing.Union[Schema_.Properties.Shapes, list, tuple, schemas.Unset] = schemas.unset, + mainShape: typing.Union[ + shape.Shape[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + shapeOrNull: typing.Union[ + shape_or_null.ShapeOrNull[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + nullableShape: typing.Union[ + nullable_shape.NullableShape[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + shapes: typing.Union[ + Schema_.Properties.Shapes[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union['fruit.Fruit', dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + **kwargs: typing.Union[ + fruit.Fruit[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], ) -> Drawing[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py index 21b022aef2e..2bcaa870312 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_arrays.py @@ -83,13 +83,11 @@ def CRAB(cls): def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> EnumArrays.Schema_.Properties.ArrayEnum[tuple]: @@ -143,10 +141,37 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - just_symbol: typing.Union[Schema_.Properties.JustSymbol, str, schemas.Unset] = schemas.unset, - array_enum: typing.Union[Schema_.Properties.ArrayEnum, list, tuple, schemas.Unset] = schemas.unset, + just_symbol: typing.Union[ + Schema_.Properties.JustSymbol[str], + schemas.Unset, + str + ] = schemas.unset, + array_enum: typing.Union[ + Schema_.Properties.ArrayEnum[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> EnumArrays[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py index de9915d2203..cfbf1e28418 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/enum_test.py @@ -231,17 +231,80 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - enum_string_required: typing.Union[Schema_.Properties.EnumStringRequired, str], - enum_string: typing.Union[Schema_.Properties.EnumString, str, schemas.Unset] = schemas.unset, - enum_integer: typing.Union[Schema_.Properties.EnumInteger, decimal.Decimal, int, schemas.Unset] = schemas.unset, - enum_number: typing.Union[Schema_.Properties.EnumNumber, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - stringEnum: typing.Union['string_enum.StringEnum', None, str, schemas.Unset] = schemas.unset, - IntegerEnum: typing.Union['integer_enum.IntegerEnum', decimal.Decimal, int, schemas.Unset] = schemas.unset, - StringEnumWithDefaultValue: typing.Union['string_enum_with_default_value.StringEnumWithDefaultValue', str, schemas.Unset] = schemas.unset, - IntegerEnumWithDefaultValue: typing.Union['integer_enum_with_default_value.IntegerEnumWithDefaultValue', decimal.Decimal, int, schemas.Unset] = schemas.unset, - IntegerEnumOneValue: typing.Union['integer_enum_one_value.IntegerEnumOneValue', decimal.Decimal, int, schemas.Unset] = schemas.unset, + enum_string_required: typing.Union[ + Schema_.Properties.EnumStringRequired[str], + str + ], + enum_string: typing.Union[ + Schema_.Properties.EnumString[str], + schemas.Unset, + str + ] = schemas.unset, + enum_integer: typing.Union[ + Schema_.Properties.EnumInteger[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + enum_number: typing.Union[ + Schema_.Properties.EnumNumber[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ] = schemas.unset, + stringEnum: typing.Union[ + string_enum.StringEnum[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str + ] = schemas.unset, + IntegerEnum: typing.Union[ + integer_enum.IntegerEnum[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + StringEnumWithDefaultValue: typing.Union[ + string_enum_with_default_value.StringEnumWithDefaultValue[str], + schemas.Unset, + str + ] = schemas.unset, + IntegerEnumWithDefaultValue: typing.Union[ + integer_enum_with_default_value.IntegerEnumWithDefaultValue[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + IntegerEnumOneValue: typing.Union[ + integer_enum_one_value.IntegerEnumOneValue[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> EnumTest[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py index b28c4dabe54..d7a531a1de9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/equilateral_triangle.py @@ -90,9 +90,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - triangleType: typing.Union[Schema_.Properties.TriangleType, str, schemas.Unset] = schemas.unset, + triangleType: typing.Union[ + Schema_.Properties.TriangleType[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> EquilateralTriangle.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -114,9 +136,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> EquilateralTriangle[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py index c1e56e44931..7b0e391b61f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file.py @@ -60,9 +60,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - sourceURI: typing.Union[Schema_.Properties.SourceURI, str, schemas.Unset] = schemas.unset, + sourceURI: typing.Union[ + Schema_.Properties.SourceURI[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> File[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py index 08f59511385..9d1e9137a03 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/file_schema_test_class.py @@ -45,13 +45,12 @@ def items() -> typing.Type[file.File]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['file.File', dict, frozendict.frozendict], ... - ], - typing.List[ - typing.Union['file.File', dict, frozendict.frozendict] - ], + arg_: typing.Sequence[ + typing.Union[ + file.File[frozendict.frozendict], + dict, + frozendict.frozendict + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> FileSchemaTestClass.Schema_.Properties.Files[tuple]: @@ -105,10 +104,38 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - file: typing.Union['file.File', dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - files: typing.Union[Schema_.Properties.Files, list, tuple, schemas.Unset] = schemas.unset, + file: typing.Union[ + file.File[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + files: typing.Union[ + Schema_.Properties.Files[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> FileSchemaTestClass[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py index 1563146dcc6..8f65054530a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/foo.py @@ -61,9 +61,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - bar: typing.Union['bar.Bar', str, schemas.Unset] = schemas.unset, + bar: typing.Union[ + bar.Bar[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Foo[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py index bb55d8361db..f8d64a6032e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/format_test.py @@ -120,13 +120,13 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, decimal.Decimal, int, float], ... - ], - typing.List[ - typing.Union[Schema_.Items, decimal.Decimal, int, float] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[decimal.Decimal], + decimal.Decimal, + int, + float + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> FormatTest.Schema_.Properties.ArrayWithUniqueItems[tuple]: @@ -356,28 +356,141 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - byte: typing.Union[Schema_.Properties.Byte, str], - date: typing.Union[Schema_.Properties.Date, str, datetime.date], - number: typing.Union[Schema_.Properties.Number, decimal.Decimal, int, float], - password: typing.Union[Schema_.Properties.Password, str], - integer: typing.Union[Schema_.Properties.Integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int32: typing.Union[Schema_.Properties.Int32, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int32withValidations: typing.Union[Schema_.Properties.Int32withValidations, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int64: typing.Union[Schema_.Properties.Int64, decimal.Decimal, int, schemas.Unset] = schemas.unset, - float32: typing.Union[Schema_.Properties.Float32, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - double: typing.Union[Schema_.Properties.Double, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - float64: typing.Union[Schema_.Properties.Float64, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - arrayWithUniqueItems: typing.Union[Schema_.Properties.ArrayWithUniqueItems, list, tuple, schemas.Unset] = schemas.unset, - string: typing.Union[Schema_.Properties.String, str, schemas.Unset] = schemas.unset, - binary: typing.Union[Schema_.Properties.Binary, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - dateTime: typing.Union[Schema_.Properties.DateTime, str, datetime.datetime, schemas.Unset] = schemas.unset, - uuid: typing.Union[Schema_.Properties.Uuid, str, uuid.UUID, schemas.Unset] = schemas.unset, - uuidNoExample: typing.Union[Schema_.Properties.UuidNoExample, str, uuid.UUID, schemas.Unset] = schemas.unset, - pattern_with_digits: typing.Union[Schema_.Properties.PatternWithDigits, str, schemas.Unset] = schemas.unset, - pattern_with_digits_and_delimiter: typing.Union[Schema_.Properties.PatternWithDigitsAndDelimiter, str, schemas.Unset] = schemas.unset, - noneProp: typing.Union[Schema_.Properties.NoneProp, None, schemas.Unset] = schemas.unset, + byte: typing.Union[ + Schema_.Properties.Byte[str], + str + ], + date: typing.Union[ + Schema_.Properties.Date[str], + str, + datetime.date + ], + number: typing.Union[ + Schema_.Properties.Number[decimal.Decimal], + decimal.Decimal, + int, + float + ], + password: typing.Union[ + Schema_.Properties.Password[str], + str + ], + integer: typing.Union[ + Schema_.Properties.Integer[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + int32: typing.Union[ + Schema_.Properties.Int32[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + int32withValidations: typing.Union[ + Schema_.Properties.Int32withValidations[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + int64: typing.Union[ + Schema_.Properties.Int64[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + float32: typing.Union[ + Schema_.Properties.Float32[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ] = schemas.unset, + double: typing.Union[ + Schema_.Properties.Double[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ] = schemas.unset, + float64: typing.Union[ + Schema_.Properties.Float64[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ] = schemas.unset, + arrayWithUniqueItems: typing.Union[ + Schema_.Properties.ArrayWithUniqueItems[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, + string: typing.Union[ + Schema_.Properties.String[str], + schemas.Unset, + str + ] = schemas.unset, + binary: typing.Union[ + Schema_.Properties.Binary[typing.Union[bytes, schemas.FileIO]], + schemas.Unset, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + dateTime: typing.Union[ + Schema_.Properties.DateTime[str], + schemas.Unset, + str, + datetime.datetime + ] = schemas.unset, + uuid: typing.Union[ + Schema_.Properties.Uuid[str], + schemas.Unset, + str, + uuid.UUID + ] = schemas.unset, + uuidNoExample: typing.Union[ + Schema_.Properties.UuidNoExample[str], + schemas.Unset, + str, + uuid.UUID + ] = schemas.unset, + pattern_with_digits: typing.Union[ + Schema_.Properties.PatternWithDigits[str], + schemas.Unset, + str + ] = schemas.unset, + pattern_with_digits_and_delimiter: typing.Union[ + Schema_.Properties.PatternWithDigitsAndDelimiter[str], + schemas.Unset, + str + ] = schemas.unset, + noneProp: typing.Union[ + Schema_.Properties.NoneProp[schemas.NoneClass], + schemas.Unset, + None + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> FormatTest[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py index b2170a5f28e..3a14b0c3916 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/from_schema.py @@ -64,10 +64,37 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - data: typing.Union[Schema_.Properties.Data, str, schemas.Unset] = schemas.unset, - id: typing.Union[Schema_.Properties.Id, decimal.Decimal, int, schemas.Unset] = schemas.unset, + data: typing.Union[ + Schema_.Properties.Data[str], + schemas.Unset, + str + ] = schemas.unset, + id: typing.Union[ + Schema_.Properties.Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> FromSchema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py index e8eff11cc6a..318d575ec54 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit.py @@ -72,10 +72,49 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - color: typing.Union[Schema_.Properties.Color, str, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + color: typing.Union[ + Schema_.Properties.Color[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Fruit[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py index 81f362af8a4..e69a4c751b0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/fruit_req.py @@ -43,9 +43,44 @@ def _2() -> typing.Type[banana_req.BananaReq]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> FruitReq[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py index d185110c9ce..cafacf1540b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/gm_fruit.py @@ -72,10 +72,49 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - color: typing.Union[Schema_.Properties.Color, str, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + color: typing.Union[ + Schema_.Properties.Color[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> GmFruit[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py index 37aa665a8f6..7ac63cff463 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/grandparent_animal.py @@ -74,9 +74,30 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - pet_type: typing.Union[Schema_.Properties.PetType, str], + pet_type: typing.Union[ + Schema_.Properties.PetType[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> GrandparentAnimal[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py index 79460cf166d..daa6d32dce8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/has_only_read_only.py @@ -64,10 +64,36 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - bar: typing.Union[Schema_.Properties.Bar, str, schemas.Unset] = schemas.unset, - foo: typing.Union[Schema_.Properties.Foo, str, schemas.Unset] = schemas.unset, + bar: typing.Union[ + Schema_.Properties.Bar[str], + schemas.Unset, + str + ] = schemas.unset, + foo: typing.Union[ + Schema_.Properties.Foo[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> HasOnlyReadOnly[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py index 1f1b5faf908..c5d5b790089 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/health_check_result.py @@ -46,7 +46,10 @@ class Schema_: def __new__( cls, - arg_: typing.Union[None, str], + arg_: typing.Union[ + None, + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> HealthCheckResult.Schema_.Properties.NullableMessage[ typing.Union[ @@ -104,9 +107,35 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - NullableMessage: typing.Union[Schema_.Properties.NullableMessage, None, str, schemas.Unset] = schemas.unset, + NullableMessage: typing.Union[ + Schema_.Properties.NullableMessage[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> HealthCheckResult[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py index 789d90966c0..22d4a7192be 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/isosceles_triangle.py @@ -90,9 +90,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - triangleType: typing.Union[Schema_.Properties.TriangleType, str, schemas.Unset] = schemas.unset, + triangleType: typing.Union[ + Schema_.Properties.TriangleType[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> IsoscelesTriangle.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -114,9 +136,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> IsoscelesTriangle[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py index 95f18dca0ff..fb976fa1ef5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/items.py @@ -29,13 +29,12 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, dict, frozendict.frozendict], ... - ], - typing.List[ - typing.Union[Schema_.Items, dict, frozendict.frozendict] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[frozendict.frozendict], + dict, + frozendict.frozendict + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Items[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py index 3d345902399..08bd3bea570 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request.py @@ -55,9 +55,44 @@ def _2() -> typing.Type[json_patch_request_move_copy.JSONPatchRequestMoveCopy]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> JSONPatchRequest.Schema_.Items[ typing.Union[ frozendict.frozendict, @@ -95,13 +130,35 @@ def __new__( def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], ... - ], - typing.List[ - typing.Union[Schema_.Items, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> JSONPatchRequest[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py index ddeacc0e94d..15818afec3b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_add_replace_test.py @@ -120,9 +120,42 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - op: typing.Union[Schema_.Properties.Op, str], - path: typing.Union[Schema_.Properties.Path, str], - value: typing.Union[Schema_.Properties.Value, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + op: typing.Union[ + Schema_.Properties.Op[str], + str + ], + path: typing.Union[ + Schema_.Properties.Path[str], + str + ], + value: typing.Union[ + Schema_.Properties.Value[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> JSONPatchRequestAddReplaceTest[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py index badaea4d441..972878e563b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_move_copy.py @@ -93,8 +93,14 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - op: typing.Union[Schema_.Properties.Op, str], - path: typing.Union[Schema_.Properties.Path, str], + op: typing.Union[ + Schema_.Properties.Op[str], + str + ], + path: typing.Union[ + Schema_.Properties.Path[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> JSONPatchRequestMoveCopy[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py index 1dfaac02387..348839bb88f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/json_patch_request_remove.py @@ -81,8 +81,14 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - op: typing.Union[Schema_.Properties.Op, str], - path: typing.Union[Schema_.Properties.Path, str], + op: typing.Union[ + Schema_.Properties.Op[str], + str + ], + path: typing.Union[ + Schema_.Properties.Path[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> JSONPatchRequestRemove[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py index dfaff7b2313..ac0b0db52b3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mammal.py @@ -56,9 +56,44 @@ def _2() -> typing.Type[pig.Pig]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Mammal[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py index c9f3801a516..93db7f1c8a1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/map_test.py @@ -53,7 +53,10 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, str], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[str], + str + ], ) -> MapTest.Schema_.Properties.MapMapOfString.Schema_.AdditionalProperties[frozendict.frozendict]: inst = super().__new__( cls, @@ -75,7 +78,11 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[frozendict.frozendict], + dict, + frozendict.frozendict + ], ) -> MapTest.Schema_.Properties.MapMapOfString[frozendict.frozendict]: inst = super().__new__( cls, @@ -129,7 +136,10 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, str], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[str], + str + ], ) -> MapTest.Schema_.Properties.MapOfEnumString[frozendict.frozendict]: inst = super().__new__( cls, @@ -161,7 +171,10 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, bool], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[schemas.BoolClass], + bool + ], ) -> MapTest.Schema_.Properties.DirectMap[frozendict.frozendict]: inst = super().__new__( cls, @@ -225,12 +238,50 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - map_map_of_string: typing.Union[Schema_.Properties.MapMapOfString, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_of_enum_string: typing.Union[Schema_.Properties.MapOfEnumString, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - direct_map: typing.Union[Schema_.Properties.DirectMap, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - indirect_map: typing.Union['string_boolean_map.StringBooleanMap', dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + map_map_of_string: typing.Union[ + Schema_.Properties.MapMapOfString[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + map_of_enum_string: typing.Union[ + Schema_.Properties.MapOfEnumString[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + direct_map: typing.Union[ + Schema_.Properties.DirectMap[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + indirect_map: typing.Union[ + string_boolean_map.StringBooleanMap[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MapTest[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py index c3da8b7845d..3d4c46b1624 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/mixed_properties_and_additional_properties_class.py @@ -49,7 +49,11 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union['animal.Animal', dict, frozendict.frozendict], + **kwargs: typing.Union[ + animal.Animal[frozendict.frozendict], + dict, + frozendict.frozendict + ], ) -> MixedPropertiesAndAdditionalPropertiesClass.Schema_.Properties.Map[frozendict.frozendict]: inst = super().__new__( cls, @@ -104,11 +108,44 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - uuid: typing.Union[Schema_.Properties.Uuid, str, uuid.UUID, schemas.Unset] = schemas.unset, - dateTime: typing.Union[Schema_.Properties.DateTime, str, datetime.datetime, schemas.Unset] = schemas.unset, - map: typing.Union[Schema_.Properties.Map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + uuid: typing.Union[ + Schema_.Properties.Uuid[str], + schemas.Unset, + str, + uuid.UUID + ] = schemas.unset, + dateTime: typing.Union[ + Schema_.Properties.DateTime[str], + schemas.Unset, + str, + datetime.datetime + ] = schemas.unset, + map: typing.Union[ + Schema_.Properties.Map[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> MixedPropertiesAndAdditionalPropertiesClass[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py index fc284d6caf4..58cd138b97e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/money.py @@ -79,10 +79,34 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - amount: typing.Union[Schema_.Properties.Amount, str], - currency: typing.Union['currency.Currency', str], + amount: typing.Union[ + Schema_.Properties.Amount[str], + str + ], + currency: typing.Union[ + currency.Currency[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Money[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py index 462d44d8340..71774e1bdac 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/name.py @@ -79,10 +79,50 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], - snake_case: typing.Union[Schema_.Properties.SnakeCase, decimal.Decimal, int, schemas.Unset] = schemas.unset, + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], + snake_case: typing.Union[ + Schema_.Properties.SnakeCase[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Name[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py index 07a7e272c5b..35abf35ee22 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/no_additional_properties.py @@ -59,8 +59,17 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - id: typing.Union[Schema_.Properties.Id, decimal.Decimal, int], - petId: typing.Union[Schema_.Properties.PetId, decimal.Decimal, int, schemas.Unset] = schemas.unset, + id: typing.Union[ + Schema_.Properties.Id[decimal.Decimal], + decimal.Decimal, + int + ], + petId: typing.Union[ + Schema_.Properties.PetId[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NoAdditionalProperties[frozendict.frozendict]: inst = super().__new__( diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py index 4ee15f0a101..f135d99a9fd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_class.py @@ -45,7 +45,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[None, decimal.Decimal, int], + arg_: typing.Union[ + None, + decimal.Decimal, + int + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableClass.Schema_.Properties.IntegerProp[ typing.Union[ @@ -87,7 +91,12 @@ class Schema_: def __new__( cls, - arg_: typing.Union[None, decimal.Decimal, int, float], + arg_: typing.Union[ + None, + decimal.Decimal, + int, + float + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableClass.Schema_.Properties.NumberProp[ typing.Union[ @@ -129,7 +138,10 @@ class Schema_: def __new__( cls, - arg_: typing.Union[None, bool], + arg_: typing.Union[ + None, + bool + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableClass.Schema_.Properties.BooleanProp[ typing.Union[ @@ -171,7 +183,10 @@ class Schema_: def __new__( cls, - arg_: typing.Union[None, str], + arg_: typing.Union[ + None, + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableClass.Schema_.Properties.StringProp[ typing.Union[ @@ -215,7 +230,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[None, str, datetime.date], + arg_: typing.Union[ + None, + str, + datetime.date + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableClass.Schema_.Properties.DateProp[ typing.Union[ @@ -259,7 +278,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[None, str, datetime.datetime], + arg_: typing.Union[ + None, + str, + datetime.datetime + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableClass.Schema_.Properties.DatetimeProp[ typing.Union[ @@ -302,7 +325,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[None, list, tuple], + arg_: typing.Union[ + None, + list, + tuple + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableClass.Schema_.Properties.ArrayNullableProp[ typing.Union[ @@ -359,9 +386,31 @@ class Schema_: def __new__( cls, - *args_: typing.Union[None, dict, frozendict.frozendict], + *args_: typing.Union[ + None, + dict, + frozendict.frozendict + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NullableClass.Schema_.Properties.ArrayAndItemsNullableProp.Schema_.Items[ typing.Union[ schemas.NoneClass, @@ -388,7 +437,11 @@ def __new__( def __new__( cls, - arg_: typing.Union[None, list, tuple], + arg_: typing.Union[ + None, + list, + tuple + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableClass.Schema_.Properties.ArrayAndItemsNullableProp[ typing.Union[ @@ -439,9 +492,31 @@ class Schema_: def __new__( cls, - *args_: typing.Union[None, dict, frozendict.frozendict], + *args_: typing.Union[ + None, + dict, + frozendict.frozendict + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NullableClass.Schema_.Properties.ArrayItemsNullable.Schema_.Items[ typing.Union[ schemas.NoneClass, @@ -467,13 +542,16 @@ def __new__( def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, None, dict, frozendict.frozendict], ... - ], - typing.List[ - typing.Union[Schema_.Items, None, dict, frozendict.frozendict] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableClass.Schema_.Properties.ArrayItemsNullable[tuple]: @@ -517,9 +595,17 @@ def __getitem__(self, name: str) -> Schema_.AdditionalProperties[frozendict.froz def __new__( cls, - *args_: typing.Union[None, dict, frozendict.frozendict], + *args_: typing.Union[ + None, + dict, + frozendict.frozendict + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[frozendict.frozendict], + dict, + frozendict.frozendict + ], ) -> NullableClass.Schema_.Properties.ObjectNullableProp[ typing.Union[ schemas.NoneClass, @@ -576,9 +662,31 @@ class Schema_: def __new__( cls, - *args_: typing.Union[None, dict, frozendict.frozendict], + *args_: typing.Union[ + None, + dict, + frozendict.frozendict + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NullableClass.Schema_.Properties.ObjectAndItemsNullableProp.Schema_.AdditionalProperties[ typing.Union[ schemas.NoneClass, @@ -612,9 +720,21 @@ def __getitem__(self, name: str) -> Schema_.AdditionalProperties[typing.Union[ def __new__( cls, - *args_: typing.Union[None, dict, frozendict.frozendict], + *args_: typing.Union[ + None, + dict, + frozendict.frozendict + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, None, dict, frozendict.frozendict], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ], ) -> NullableClass.Schema_.Properties.ObjectAndItemsNullableProp[ typing.Union[ schemas.NoneClass, @@ -665,9 +785,31 @@ class Schema_: def __new__( cls, - *args_: typing.Union[None, dict, frozendict.frozendict], + *args_: typing.Union[ + None, + dict, + frozendict.frozendict + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NullableClass.Schema_.Properties.ObjectItemsNullable.Schema_.AdditionalProperties[ typing.Union[ schemas.NoneClass, @@ -702,7 +844,15 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, None, dict, frozendict.frozendict], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ], ) -> NullableClass.Schema_.Properties.ObjectItemsNullable[frozendict.frozendict]: inst = super().__new__( cls, @@ -748,9 +898,31 @@ class Schema_: def __new__( cls, - *args_: typing.Union[None, dict, frozendict.frozendict], + *args_: typing.Union[ + None, + dict, + frozendict.frozendict + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NullableClass.Schema_.AdditionalProperties[ typing.Union[ schemas.NoneClass, @@ -870,20 +1042,127 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - integer_prop: typing.Union[Schema_.Properties.IntegerProp, None, decimal.Decimal, int, schemas.Unset] = schemas.unset, - number_prop: typing.Union[Schema_.Properties.NumberProp, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - boolean_prop: typing.Union[Schema_.Properties.BooleanProp, None, bool, schemas.Unset] = schemas.unset, - string_prop: typing.Union[Schema_.Properties.StringProp, None, str, schemas.Unset] = schemas.unset, - date_prop: typing.Union[Schema_.Properties.DateProp, None, str, datetime.date, schemas.Unset] = schemas.unset, - datetime_prop: typing.Union[Schema_.Properties.DatetimeProp, None, str, datetime.datetime, schemas.Unset] = schemas.unset, - array_nullable_prop: typing.Union[Schema_.Properties.ArrayNullableProp, None, list, tuple, schemas.Unset] = schemas.unset, - array_and_items_nullable_prop: typing.Union[Schema_.Properties.ArrayAndItemsNullableProp, None, list, tuple, schemas.Unset] = schemas.unset, - array_items_nullable: typing.Union[Schema_.Properties.ArrayItemsNullable, list, tuple, schemas.Unset] = schemas.unset, - object_nullable_prop: typing.Union[Schema_.Properties.ObjectNullableProp, None, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - object_and_items_nullable_prop: typing.Union[Schema_.Properties.ObjectAndItemsNullableProp, None, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - object_items_nullable: typing.Union[Schema_.Properties.ObjectItemsNullable, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + integer_prop: typing.Union[ + Schema_.Properties.IntegerProp[typing.Union[ + schemas.NoneClass, + decimal.Decimal + ]], + schemas.Unset, + None, + decimal.Decimal, + int + ] = schemas.unset, + number_prop: typing.Union[ + Schema_.Properties.NumberProp[typing.Union[ + schemas.NoneClass, + decimal.Decimal + ]], + schemas.Unset, + None, + decimal.Decimal, + int, + float + ] = schemas.unset, + boolean_prop: typing.Union[ + Schema_.Properties.BooleanProp[typing.Union[ + schemas.NoneClass, + schemas.BoolClass + ]], + schemas.Unset, + None, + bool + ] = schemas.unset, + string_prop: typing.Union[ + Schema_.Properties.StringProp[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str + ] = schemas.unset, + date_prop: typing.Union[ + Schema_.Properties.DateProp[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str, + datetime.date + ] = schemas.unset, + datetime_prop: typing.Union[ + Schema_.Properties.DatetimeProp[typing.Union[ + schemas.NoneClass, + str + ]], + schemas.Unset, + None, + str, + datetime.datetime + ] = schemas.unset, + array_nullable_prop: typing.Union[ + Schema_.Properties.ArrayNullableProp[typing.Union[ + schemas.NoneClass, + tuple + ]], + schemas.Unset, + None, + list, + tuple + ] = schemas.unset, + array_and_items_nullable_prop: typing.Union[ + Schema_.Properties.ArrayAndItemsNullableProp[typing.Union[ + schemas.NoneClass, + tuple + ]], + schemas.Unset, + None, + list, + tuple + ] = schemas.unset, + array_items_nullable: typing.Union[ + Schema_.Properties.ArrayItemsNullable[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, + object_nullable_prop: typing.Union[ + Schema_.Properties.ObjectNullableProp[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + schemas.Unset, + None, + dict, + frozendict.frozendict + ] = schemas.unset, + object_and_items_nullable_prop: typing.Union[ + Schema_.Properties.ObjectAndItemsNullableProp[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + schemas.Unset, + None, + dict, + frozendict.frozendict + ] = schemas.unset, + object_items_nullable: typing.Union[ + Schema_.Properties.ObjectItemsNullable[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, None, dict, frozendict.frozendict], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + None, + dict, + frozendict.frozendict + ], ) -> NullableClass[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py index 8a470184946..5173f0d6e46 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_shape.py @@ -45,9 +45,44 @@ def _1() -> typing.Type[quadrilateral.Quadrilateral]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NullableShape[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py index 6aea312866b..34c036be5c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/nullable_string.py @@ -33,7 +33,10 @@ class Schema_: def __new__( cls, - arg_: typing.Union[None, str], + arg_: typing.Union[ + None, + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> NullableString[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py index 22702defcaa..db95837f2d8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/number_only.py @@ -58,9 +58,33 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - JustNumber: typing.Union[Schema_.Properties.JustNumber, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + JustNumber: typing.Union[ + Schema_.Properties.JustNumber[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> NumberOnly[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py index be427fc6179..82f155d961d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props.py @@ -77,9 +77,30 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - a: typing.Union[Schema_.Properties.A, str], + a: typing.Union[ + Schema_.Properties.A[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjWithRequiredProps[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py index 5f1f7ef22e1..e3483dbd79b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/obj_with_required_props_base.py @@ -65,9 +65,30 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - b: typing.Union[Schema_.Properties.B, str], + b: typing.Union[ + Schema_.Properties.B[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjWithRequiredPropsBase[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py index 8cc91a7d819..f42727d5f13 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_arg_and_args_properties.py @@ -76,10 +76,34 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - arg: typing.Union[Schema_.Properties.Arg, str], - args: typing.Union[Schema_.Properties.Args, str], + arg: typing.Union[ + Schema_.Properties.Arg[str], + str + ], + args: typing.Union[ + Schema_.Properties.Args[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectModelWithArgAndArgsProperties[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py index 8799a3180dd..e35fd590971 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_model_with_ref_props.py @@ -81,11 +81,43 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - myNumber: typing.Union['number_with_validations.NumberWithValidations', decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - myString: typing.Union['string.String', str, schemas.Unset] = schemas.unset, - myBoolean: typing.Union['boolean.Boolean', bool, schemas.Unset] = schemas.unset, + myNumber: typing.Union[ + number_with_validations.NumberWithValidations[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int, + float + ] = schemas.unset, + myString: typing.Union[ + string.String[str], + schemas.Unset, + str + ] = schemas.unset, + myBoolean: typing.Union[ + boolean.Boolean[schemas.BoolClass], + schemas.Unset, + bool + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectModelWithRefProps[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 639689f63c6..0ffaf4c6890 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -98,9 +98,54 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - test: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + test: typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithAllOfWithReqTestPropFromUnsetAddProp.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -122,9 +167,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithAllOfWithReqTestPropFromUnsetAddProp[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py index ec5dda29e9d..6692d939808 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_colliding_properties.py @@ -66,10 +66,38 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - someProp: typing.Union[Schema_.Properties.SomeProp, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - someprop: typing.Union[Schema_.Properties.Someprop, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + someProp: typing.Union[ + Schema_.Properties.SomeProp[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + someprop: typing.Union[ + Schema_.Properties.Someprop[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithCollidingProperties[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py index 76af0be04f1..90205445f49 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_decimal_properties.py @@ -76,11 +76,42 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - length: typing.Union['decimal_payload.DecimalPayload', str, schemas.Unset] = schemas.unset, - width: typing.Union[Schema_.Properties.Width, str, schemas.Unset] = schemas.unset, - cost: typing.Union['money.Money', dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + length: typing.Union[ + decimal_payload.DecimalPayload[str], + schemas.Unset, + str + ] = schemas.unset, + width: typing.Union[ + Schema_.Properties.Width[str], + schemas.Unset, + str + ] = schemas.unset, + cost: typing.Union[ + money.Money[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithDecimalProperties[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py index 2d05f960894..375f630e55b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_difficultly_named_props.py @@ -76,7 +76,25 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithDifficultlyNamedProps[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py index 35140b4d2f5..61c8b3b21da 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_inline_composition_property.py @@ -55,9 +55,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithInlineCompositionProperty.Schema_.Properties.SomeProp[ typing.Union[ frozendict.frozendict, @@ -133,9 +168,55 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - someProp: typing.Union[Schema_.Properties.SomeProp, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + someProp: typing.Union[ + Schema_.Properties.SomeProp[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithInlineCompositionProperty[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py index 310a34c13d7..797bdd494b7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_invalid_named_refed_properties.py @@ -75,7 +75,25 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithInvalidNamedRefedProperties[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py index 49e70b4e699..fe8cf9985f3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_optional_test_prop.py @@ -58,9 +58,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - test: typing.Union[Schema_.Properties.Test, str, schemas.Unset] = schemas.unset, + test: typing.Union[ + Schema_.Properties.Test[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithOptionalTestProp[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py index fc22dc1c7a6..ec7fc27394b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/object_with_validations.py @@ -29,7 +29,25 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ObjectWithValidations[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py index a091be20024..d2c647606e6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/order.py @@ -126,14 +126,60 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - id: typing.Union[Schema_.Properties.Id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - petId: typing.Union[Schema_.Properties.PetId, decimal.Decimal, int, schemas.Unset] = schemas.unset, - quantity: typing.Union[Schema_.Properties.Quantity, decimal.Decimal, int, schemas.Unset] = schemas.unset, - shipDate: typing.Union[Schema_.Properties.ShipDate, str, datetime.datetime, schemas.Unset] = schemas.unset, - status: typing.Union[Schema_.Properties.Status, str, schemas.Unset] = schemas.unset, - complete: typing.Union[Schema_.Properties.Complete, bool, schemas.Unset] = schemas.unset, + id: typing.Union[ + Schema_.Properties.Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + petId: typing.Union[ + Schema_.Properties.PetId[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + quantity: typing.Union[ + Schema_.Properties.Quantity[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + shipDate: typing.Union[ + Schema_.Properties.ShipDate[str], + schemas.Unset, + str, + datetime.datetime + ] = schemas.unset, + status: typing.Union[ + Schema_.Properties.Status[str], + schemas.Unset, + str + ] = schemas.unset, + complete: typing.Union[ + Schema_.Properties.Complete[schemas.BoolClass], + schemas.Unset, + bool + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Order[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py index fd59d19440c..80b036939f4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/parent_pet.py @@ -48,7 +48,25 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ParentPet[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py index 477df822b5c..2b03afede87 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pet.py @@ -50,13 +50,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Pet.Schema_.Properties.PhotoUrls[tuple]: @@ -89,13 +87,12 @@ def items() -> typing.Type[tag.Tag]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['tag.Tag', dict, frozendict.frozendict], ... - ], - typing.List[ - typing.Union['tag.Tag', dict, frozendict.frozendict] - ], + arg_: typing.Sequence[ + typing.Union[ + tag.Tag[frozendict.frozendict], + dict, + frozendict.frozendict + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Pet.Schema_.Properties.Tags[tuple]: @@ -205,14 +202,58 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - name: typing.Union[Schema_.Properties.Name, str], - photoUrls: typing.Union[Schema_.Properties.PhotoUrls, list, tuple], - id: typing.Union[Schema_.Properties.Id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - category: typing.Union['category.Category', dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - tags: typing.Union[Schema_.Properties.Tags, list, tuple, schemas.Unset] = schemas.unset, - status: typing.Union[Schema_.Properties.Status, str, schemas.Unset] = schemas.unset, + name: typing.Union[ + Schema_.Properties.Name[str], + str + ], + photoUrls: typing.Union[ + Schema_.Properties.PhotoUrls[tuple], + list, + tuple + ], + id: typing.Union[ + Schema_.Properties.Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + category: typing.Union[ + category.Category[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + tags: typing.Union[ + Schema_.Properties.Tags[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, + status: typing.Union[ + Schema_.Properties.Status[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Pet[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py index f4a2d2809c2..47493c99607 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/pig.py @@ -50,9 +50,44 @@ def _1() -> typing.Type[danish_pig.DanishPig]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Pig[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py index 2f935cd5a4b..a9d294b8b7a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/player.py @@ -69,10 +69,37 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - name: typing.Union[Schema_.Properties.Name, str, schemas.Unset] = schemas.unset, - enemyPlayer: typing.Union['Player', dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + name: typing.Union[ + Schema_.Properties.Name[str], + schemas.Unset, + str + ] = schemas.unset, + enemyPlayer: typing.Union[ + Player[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Player[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py index 185ca3faaea..98fa8bec599 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral.py @@ -50,9 +50,44 @@ def _1() -> typing.Type[complex_quadrilateral.ComplexQuadrilateral]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Quadrilateral[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py index 650a40b2ded..6228c649215 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/quadrilateral_interface.py @@ -93,9 +93,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> QuadrilateralInterface[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py index e70a3950fd3..bd7ed788b4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/read_only_first.py @@ -64,10 +64,36 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - bar: typing.Union[Schema_.Properties.Bar, str, schemas.Unset] = schemas.unset, - baz: typing.Union[Schema_.Properties.Baz, str, schemas.Unset] = schemas.unset, + bar: typing.Union[ + Schema_.Properties.Bar[str], + schemas.Unset, + str + ] = schemas.unset, + baz: typing.Union[ + Schema_.Properties.Baz[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ReadOnlyFirst[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py index 565e591dd36..a9049a2fe73 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_explicit_add_props.py @@ -56,9 +56,15 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - validName: typing.Union[Schema_.AdditionalProperties, str], + validName: typing.Union[ + Schema_.AdditionalProperties[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, str], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[str], + str + ], ) -> ReqPropsFromExplicitAddProps[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py index a1c37f15bc6..ec6a08871cb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_true_add_props.py @@ -92,9 +92,63 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - validName: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + validName: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], ) -> ReqPropsFromTrueAddProps[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py index bf4afbf63f5..922083c5374 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/req_props_from_unset_add_props.py @@ -91,9 +91,54 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - validName: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + validName: typing.Union[ + schemas.AnyTypeSchema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ReqPropsFromUnsetAddProps[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py index 2d355386511..da55a3ef129 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/scalene_triangle.py @@ -90,9 +90,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - triangleType: typing.Union[Schema_.Properties.TriangleType, str, schemas.Unset] = schemas.unset, + triangleType: typing.Union[ + Schema_.Properties.TriangleType[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ScaleneTriangle.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -114,9 +136,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ScaleneTriangle[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py index 52b3a87c36a..6dfafa9f5f7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_array_model.py @@ -30,13 +30,12 @@ def items() -> typing.Type[SelfReferencingArrayModel]: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union['SelfReferencingArrayModel', list, tuple], ... - ], - typing.List[ - typing.Union['SelfReferencingArrayModel', list, tuple] - ], + arg_: typing.Sequence[ + typing.Union[ + SelfReferencingArrayModel[tuple], + list, + tuple + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> SelfReferencingArrayModel[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py index e95ac4cc6bb..780922a2bbe 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/self_referencing_object_model.py @@ -56,9 +56,18 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - selfRef: typing.Union['SelfReferencingObjectModel', dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + selfRef: typing.Union[ + SelfReferencingObjectModel[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union['SelfReferencingObjectModel', dict, frozendict.frozendict], + **kwargs: typing.Union[ + SelfReferencingObjectModel[frozendict.frozendict], + dict, + frozendict.frozendict + ], ) -> SelfReferencingObjectModel[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py index 0317f77b400..f3b7ee65299 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape.py @@ -50,9 +50,44 @@ def _1() -> typing.Type[quadrilateral.Quadrilateral]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Shape[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py index 99936eee6e3..b1abd2a96c7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/shape_or_null.py @@ -54,9 +54,44 @@ def _2() -> typing.Type[quadrilateral.Quadrilateral]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> ShapeOrNull[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py index 732ea74e552..7e7786c516a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/simple_quadrilateral.py @@ -90,9 +90,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - quadrilateralType: typing.Union[Schema_.Properties.QuadrilateralType, str, schemas.Unset] = schemas.unset, + quadrilateralType: typing.Union[ + Schema_.Properties.QuadrilateralType[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> SimpleQuadrilateral.Schema_.AllOf._1[frozendict.frozendict]: inst = super().__new__( cls, @@ -114,9 +136,44 @@ def __new__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> SimpleQuadrilateral[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py index 5bfafb6e489..a2ee26dfdd9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/some_object.py @@ -36,9 +36,44 @@ def _0() -> typing.Type[object_interface.ObjectInterface]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> SomeObject[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py index 050e9b803b5..2f038b7d7c6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/special_model_name.py @@ -60,9 +60,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - a: typing.Union[Schema_.Properties.A, str, schemas.Unset] = schemas.unset, + a: typing.Union[ + Schema_.Properties.A[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> SpecialModelName[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py index d4f0d68c63b..352be623353 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_boolean_map.py @@ -33,7 +33,10 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, bool], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[schemas.BoolClass], + bool + ], ) -> StringBooleanMap[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py index b21ff58e098..3d3a3a6d82d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/string_enum.py @@ -70,7 +70,10 @@ def NONE(cls): def __new__( cls, - arg_: typing.Union[None, str], + arg_: typing.Union[ + None, + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> StringEnum[ typing.Union[ diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py index 13ef0fa321f..2e749c27f19 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/tag.py @@ -64,10 +64,37 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - id: typing.Union[Schema_.Properties.Id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - name: typing.Union[Schema_.Properties.Name, str, schemas.Unset] = schemas.unset, + id: typing.Union[ + Schema_.Properties.Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + name: typing.Union[ + Schema_.Properties.Name[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Tag[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py index a8d2bee0ea8..a12d4387b7f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle.py @@ -56,9 +56,44 @@ def _2() -> typing.Type[scalene_triangle.ScaleneTriangle]: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Triangle[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py index 169ccb31747..3cea7493ca7 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/triangle_interface.py @@ -93,9 +93,44 @@ def __getitem__( def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> TriangleInterface[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py index be8d021de32..12e24f6bfd2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/user.py @@ -53,9 +53,31 @@ class Schema_: def __new__( cls, - *args_: typing.Union[None, dict, frozendict.frozendict], + *args_: typing.Union[ + None, + dict, + frozendict.frozendict + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> User.Schema_.Properties.ObjectWithNoDeclaredPropsNullable[ typing.Union[ schemas.NoneClass, @@ -93,9 +115,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> User.Schema_.Properties.AnyTypeExceptNullProp[ typing.Union[ frozendict.frozendict, @@ -253,21 +310,171 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - id: typing.Union[Schema_.Properties.Id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - username: typing.Union[Schema_.Properties.Username, str, schemas.Unset] = schemas.unset, - firstName: typing.Union[Schema_.Properties.FirstName, str, schemas.Unset] = schemas.unset, - lastName: typing.Union[Schema_.Properties.LastName, str, schemas.Unset] = schemas.unset, - email: typing.Union[Schema_.Properties.Email, str, schemas.Unset] = schemas.unset, - password: typing.Union[Schema_.Properties.Password, str, schemas.Unset] = schemas.unset, - phone: typing.Union[Schema_.Properties.Phone, str, schemas.Unset] = schemas.unset, - userStatus: typing.Union[Schema_.Properties.UserStatus, decimal.Decimal, int, schemas.Unset] = schemas.unset, - objectWithNoDeclaredProps: typing.Union[Schema_.Properties.ObjectWithNoDeclaredProps, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - objectWithNoDeclaredPropsNullable: typing.Union[Schema_.Properties.ObjectWithNoDeclaredPropsNullable, None, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - anyTypeProp: typing.Union[Schema_.Properties.AnyTypeProp, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - anyTypeExceptNullProp: typing.Union[Schema_.Properties.AnyTypeExceptNullProp, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - anyTypePropNullable: typing.Union[Schema_.Properties.AnyTypePropNullable, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + id: typing.Union[ + Schema_.Properties.Id[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + username: typing.Union[ + Schema_.Properties.Username[str], + schemas.Unset, + str + ] = schemas.unset, + firstName: typing.Union[ + Schema_.Properties.FirstName[str], + schemas.Unset, + str + ] = schemas.unset, + lastName: typing.Union[ + Schema_.Properties.LastName[str], + schemas.Unset, + str + ] = schemas.unset, + email: typing.Union[ + Schema_.Properties.Email[str], + schemas.Unset, + str + ] = schemas.unset, + password: typing.Union[ + Schema_.Properties.Password[str], + schemas.Unset, + str + ] = schemas.unset, + phone: typing.Union[ + Schema_.Properties.Phone[str], + schemas.Unset, + str + ] = schemas.unset, + userStatus: typing.Union[ + Schema_.Properties.UserStatus[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + objectWithNoDeclaredProps: typing.Union[ + Schema_.Properties.ObjectWithNoDeclaredProps[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, + objectWithNoDeclaredPropsNullable: typing.Union[ + Schema_.Properties.ObjectWithNoDeclaredPropsNullable[typing.Union[ + schemas.NoneClass, + frozendict.frozendict + ]], + schemas.Unset, + None, + dict, + frozendict.frozendict + ] = schemas.unset, + anyTypeProp: typing.Union[ + Schema_.Properties.AnyTypeProp[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + anyTypeExceptNullProp: typing.Union[ + Schema_.Properties.AnyTypeExceptNullProp[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + anyTypePropNullable: typing.Union[ + Schema_.Properties.AnyTypePropNullable[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> User[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py index 7ad4105aedb..c9eae619c4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/whale.py @@ -94,11 +94,40 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - className: typing.Union[Schema_.Properties.ClassName, str], - hasBaleen: typing.Union[Schema_.Properties.HasBaleen, bool, schemas.Unset] = schemas.unset, - hasTeeth: typing.Union[Schema_.Properties.HasTeeth, bool, schemas.Unset] = schemas.unset, + className: typing.Union[ + Schema_.Properties.ClassName[str], + str + ], + hasBaleen: typing.Union[ + Schema_.Properties.HasBaleen[schemas.BoolClass], + schemas.Unset, + bool + ] = schemas.unset, + hasTeeth: typing.Union[ + Schema_.Properties.HasTeeth[schemas.BoolClass], + schemas.Unset, + bool + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Whale[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py index 8daa8a90ce2..3418b48e525 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/components/schema/zebra.py @@ -116,10 +116,44 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - className: typing.Union[Schema_.Properties.ClassName, str], - type: typing.Union[Schema_.Properties.Type, str, schemas.Unset] = schemas.unset, + className: typing.Union[ + Schema_.Properties.ClassName[str], + str + ], + type: typing.Union[ + Schema_.Properties.Type[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], ) -> Zebra[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/another_fake_dummy/patch/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/another_fake_dummy/patch/operation.py index 69e97d89eaa..4ccd0552acb 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/another_fake_dummy/patch/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/another_fake_dummy/patch/operation.py @@ -37,12 +37,12 @@ def _call_123_test__special_tags( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -53,50 +53,14 @@ def _call_123_test__special_tags( dict, frozendict.frozendict ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _call_123_test__special_tags( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _call_123_test__special_tags( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _call_123_test__special_tags( self, body: typing.Union[ @@ -104,12 +68,12 @@ def _call_123_test__special_tags( dict, frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ To test special tags @@ -147,9 +111,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/operation.py index 5a9583091df..39d7af3b69c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/delete/operation.py @@ -94,51 +94,36 @@ class BaseApi(api_client.Api): @typing.overload def _group_parameters( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, + header_params: RequestHeaderParameters.Params, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _group_parameters( self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, + header_params: RequestHeaderParameters.Params, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _group_parameters( - self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _group_parameters( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, + header_params: RequestHeaderParameters.Params, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Fake endpoint to test group parameters (optional) @@ -182,9 +167,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/operation.py index c155ecb5a53..424a69799fa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/operation.py @@ -99,99 +99,57 @@ class BaseApi(api_client.Api): @typing.overload def _enum_parameters( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, + header_params: typing.Optional[RequestHeaderParameters.Params] = None, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _enum_parameters( self, - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _enum_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, + header_params: typing.Optional[RequestHeaderParameters.Params] = None, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _enum_parameters( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _enum_parameters( self, - content_type: str = 'application/x-www-form-urlencoded', body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, + header_params: typing.Optional[RequestHeaderParameters.Params] = None, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ To test enum parameters @@ -239,10 +197,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '404', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py index 7c4042186ea..9b7c4fcf5b0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_0/schema.py @@ -45,13 +45,11 @@ def DOLLAR_SIGN(cls): def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py index 7c4042186ea..9b7c4fcf5b0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/parameters/parameter_2/schema.py @@ -45,13 +45,11 @@ def DOLLAR_SIGN(cls): def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/__init__.py index 92804e6d87c..741380d6d4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): - schema: typing.Type[application_x_www_form_urlencoded_schema.Schema] = application_x_www_form_urlencoded_schema.Schema + schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py index 5aef63f291a..17f6ad25d7c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -56,13 +56,11 @@ def DOLLAR_SIGN(cls): def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema.Schema_.Properties.EnumFormStringArray[tuple]: @@ -145,10 +143,37 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - enum_form_string_array: typing.Union[Schema_.Properties.EnumFormStringArray, list, tuple, schemas.Unset] = schemas.unset, - enum_form_string: typing.Union[Schema_.Properties.EnumFormString, str, schemas.Unset] = schemas.unset, + enum_form_string_array: typing.Union[ + Schema_.Properties.EnumFormStringArray[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, + enum_form_string: typing.Union[ + Schema_.Properties.EnumFormString[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/patch/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/patch/operation.py index 8d377b75b31..bb4f773a08f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/patch/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/patch/operation.py @@ -37,12 +37,12 @@ def _client_model( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -53,50 +53,14 @@ def _client_model( dict, frozendict.frozendict ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _client_model( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _client_model( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _client_model( self, body: typing.Union[ @@ -104,12 +68,12 @@ def _client_model( dict, frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ To test \"client\" model @@ -147,9 +111,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/operation.py index 4e4aba1f208..19454a15c97 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/operation.py @@ -38,89 +38,51 @@ class BaseApi(api_client.Api): @typing.overload def _endpoint_parameters( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _endpoint_parameters( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _endpoint_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _endpoint_parameters( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _endpoint_parameters( self, - content_type: str = 'application/x-www-form-urlencoded', body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -164,10 +126,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '404', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/__init__.py index 92804e6d87c..741380d6d4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): - schema: typing.Type[application_x_www_form_urlencoded_schema.Schema] = application_x_www_form_urlencoded_schema.Schema + schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py index 21da9d2e3c7..e20d6064bba 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -267,21 +267,98 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - byte: typing.Union[Schema_.Properties.Byte, str], - double: typing.Union[Schema_.Properties.Double, decimal.Decimal, int, float], - number: typing.Union[Schema_.Properties.Number, decimal.Decimal, int, float], - pattern_without_delimiter: typing.Union[Schema_.Properties.PatternWithoutDelimiter, str], - integer: typing.Union[Schema_.Properties.Integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int32: typing.Union[Schema_.Properties.Int32, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int64: typing.Union[Schema_.Properties.Int64, decimal.Decimal, int, schemas.Unset] = schemas.unset, - string: typing.Union[Schema_.Properties.String, str, schemas.Unset] = schemas.unset, - binary: typing.Union[Schema_.Properties.Binary, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - date: typing.Union[Schema_.Properties.Date, str, datetime.date, schemas.Unset] = schemas.unset, - dateTime: typing.Union[Schema_.Properties.DateTime, str, datetime.datetime, schemas.Unset] = schemas.unset, - password: typing.Union[Schema_.Properties.Password, str, schemas.Unset] = schemas.unset, - callback: typing.Union[Schema_.Properties.Callback, str, schemas.Unset] = schemas.unset, + byte: typing.Union[ + Schema_.Properties.Byte[str], + str + ], + double: typing.Union[ + Schema_.Properties.Double[decimal.Decimal], + decimal.Decimal, + int, + float + ], + number: typing.Union[ + Schema_.Properties.Number[decimal.Decimal], + decimal.Decimal, + int, + float + ], + pattern_without_delimiter: typing.Union[ + Schema_.Properties.PatternWithoutDelimiter[str], + str + ], + integer: typing.Union[ + Schema_.Properties.Integer[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + int32: typing.Union[ + Schema_.Properties.Int32[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + int64: typing.Union[ + Schema_.Properties.Int64[decimal.Decimal], + schemas.Unset, + decimal.Decimal, + int + ] = schemas.unset, + string: typing.Union[ + Schema_.Properties.String[str], + schemas.Unset, + str + ] = schemas.unset, + binary: typing.Union[ + Schema_.Properties.Binary[typing.Union[bytes, schemas.FileIO]], + schemas.Unset, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, + date: typing.Union[ + Schema_.Properties.Date[str], + schemas.Unset, + str, + datetime.date + ] = schemas.unset, + dateTime: typing.Union[ + Schema_.Properties.DateTime[str], + schemas.Unset, + str, + datetime.datetime + ] = schemas.unset, + password: typing.Union[ + Schema_.Properties.Password[str], + schemas.Unset, + str + ] = schemas.unset, + callback: typing.Union[ + Schema_.Properties.Callback[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/operation.py index e60a316032c..287d6b37ce3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/operation.py @@ -32,89 +32,51 @@ class BaseApi(api_client.Api): @typing.overload def _additional_properties_with_array_of_enums( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _additional_properties_with_array_of_enums( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _additional_properties_with_array_of_enums( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _additional_properties_with_array_of_enums( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _additional_properties_with_array_of_enums( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Additional Properties with Array of Enums @@ -152,9 +114,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py index 34e8a298aef..e296fe56410 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_additional_properties_with_array_of_enums/get/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_file_schema/put/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_file_schema/put/operation.py index d84f4d237b5..7721c796bae 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_file_schema/put/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_file_schema/put/operation.py @@ -33,11 +33,11 @@ def _body_with_file_schema( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _body_with_file_schema( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _body_with_file_schema( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _body_with_file_schema( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _body_with_file_schema( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -137,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_file_schema/put/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_file_schema/put/request_body/__init__.py index e3c1b3362f1..ce6f2e055f9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_file_schema/put/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_file_schema/put/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/operation.py index 423b11823c3..68e879cd417 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/operation.py @@ -57,12 +57,12 @@ def _body_with_query_params( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -70,66 +70,30 @@ def _body_with_query_params( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _body_with_query_params( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _body_with_query_params( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _body_with_query_params( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -171,9 +135,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/request_body/__init__.py index e3c1b3362f1..ce6f2e055f9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_body_with_query_params/put/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/operation.py index fdf41943e60..2269f799c88 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_case_sensitive_params/put/operation.py @@ -59,43 +59,30 @@ class BaseApi(api_client.Api): @typing.overload def _case_sensitive_params( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _case_sensitive_params( self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _case_sensitive_params( - self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _case_sensitive_params( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -126,9 +113,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_classname_test/patch/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_classname_test/patch/operation.py index 9f7a7add39a..2abee15cdc2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_classname_test/patch/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_classname_test/patch/operation.py @@ -42,13 +42,13 @@ def _classname( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -59,53 +59,15 @@ def _classname( dict, frozendict.frozendict ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _classname( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _classname( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _classname( self, body: typing.Union[ @@ -113,13 +75,13 @@ def _classname( dict, frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ To test class name in snake case @@ -163,9 +125,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/operation.py index 4d23c747a69..137f2ba20d8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_delete_coffee_id/delete/operation.py @@ -55,11 +55,11 @@ class BaseApi(api_client.Api): @typing.overload def _delete_coffee( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> typing.Union[ response_200.ResponseFor200.response_cls, response_default.Default.response_cls, @@ -68,34 +68,20 @@ def _delete_coffee( @typing.overload def _delete_coffee( self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_coffee( - self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - response_default.Default.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _delete_coffee( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Delete coffee @@ -127,9 +113,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_health/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_health/get/operation.py index a080577e3cd..ba46014ae85 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_health/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_health/get/operation.py @@ -35,39 +35,26 @@ def _fake_health_get( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _fake_health_get( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _fake_health_get( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _fake_health_get( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Health check endpoint @@ -96,9 +83,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/operation.py index 2ffb8a63a5c..38e34721b95 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/operation.py @@ -33,11 +33,11 @@ def _inline_additional_properties( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -45,62 +45,28 @@ def _inline_additional_properties( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _inline_additional_properties( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _inline_additional_properties( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _inline_additional_properties( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ test inline additionalProperties @@ -138,9 +104,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/__init__.py index e3c1b3362f1..ce6f2e055f9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py index a3cabee132c..40dd94f5e63 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_additional_properties/post/request_body/content/application_json/schema.py @@ -28,7 +28,10 @@ def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[Schema_.AdditionalProperties, str], + **kwargs: typing.Union[ + Schema_.AdditionalProperties[str], + str + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/operation.py index c32db7acaa4..3e00bc54e86 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/operation.py @@ -62,57 +62,6 @@ class BaseApi(api_client.Api): @typing.overload def _inline_composition( self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - @typing.overload - def _inline_composition( - self, - content_type: typing_extensions.Literal["multipart/form-data"], - body: typing.Union[ - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - @typing.overload - def _inline_composition( - self, - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, request_body.RequestBody.content["multipart/form-data"].schema, @@ -134,20 +83,21 @@ def _inline_composition( io.FileIO, io.BufferedReader ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, + content_type: typing_extensions.Literal[ + "application/json", + "multipart/form-data", + ] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... - @typing.overload def _inline_composition( self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, request_body.RequestBody.content["multipart/form-data"].schema, @@ -169,52 +119,20 @@ def _inline_composition( io.FileIO, io.BufferedReader ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, + content_type: typing_extensions.Literal[ + "application/json", + "multipart/form-data", + ] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _inline_composition( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _inline_composition( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, request_body.RequestBody.content["multipart/form-data"].schema, @@ -236,12 +154,16 @@ def _inline_composition( io.FileIO, io.BufferedReader ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, + content_type: typing_extensions.Literal[ + "application/json", + "multipart/form-data", + ] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ testing composed schemas at inline locations @@ -284,9 +206,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py index 2a11183f7e3..c7de2034f62 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_0/schema.py @@ -39,9 +39,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py index 79e6436900f..f11e82c626e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/parameters/parameter_1/schema.py @@ -50,9 +50,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema.Schema_.Properties.SomeProp[ typing.Union[ frozendict.frozendict, @@ -128,9 +163,55 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - someProp: typing.Union[Schema_.Properties.SomeProp, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + someProp: typing.Union[ + Schema_.Properties.SomeProp[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/__init__.py index af0cc30392b..0fba1dac5dd 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/__init__.py @@ -13,11 +13,20 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] class MultipartFormDataMediaType(api_client.MediaType): - schema: typing.Type[multipart_form_data_schema.Schema] = multipart_form_data_schema.Schema + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py index 2a11183f7e3..c7de2034f62 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/application_json/schema.py @@ -39,9 +39,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py index 79e6436900f..f11e82c626e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/request_body/content/multipart_form_data/schema.py @@ -50,9 +50,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema.Schema_.Properties.SomeProp[ typing.Union[ frozendict.frozendict, @@ -128,9 +163,55 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - someProp: typing.Union[Schema_.Properties.SomeProp, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + someProp: typing.Union[ + Schema_.Properties.SomeProp[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py index 2a11183f7e3..c7de2034f62 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/application_json/schema.py @@ -39,9 +39,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[ typing.Union[ frozendict.frozendict, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py index 79e6436900f..f11e82c626e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_inline_composition/post/responses/response_200/content/multipart_form_data/schema.py @@ -50,9 +50,44 @@ class Schema_: def __new__( cls, - *args_: typing.Union[dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader], + *args_: typing.Union[ + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema.Schema_.Properties.SomeProp[ typing.Union[ frozendict.frozendict, @@ -128,9 +163,55 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - someProp: typing.Union[Schema_.Properties.SomeProp, dict, frozendict.frozendict, str, datetime.date, datetime.datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + someProp: typing.Union[ + Schema_.Properties.SomeProp[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]], + schemas.Unset, + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/operation.py index aa60d4fe167..c147900b1b2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/operation.py @@ -28,84 +28,48 @@ class BaseApi(api_client.Api): @typing.overload def _json_form_data( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _json_form_data( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _json_form_data( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _json_form_data( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _json_form_data( self, - content_type: str = 'application/x-www-form-urlencoded', body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ test json serialization of form data @@ -143,9 +107,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/__init__.py index 92804e6d87c..741380d6d4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): - schema: typing.Type[application_x_www_form_urlencoded_schema.Schema] = application_x_www_form_urlencoded_schema.Schema + schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py index 328960efe70..34421180f3d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_form_data/get/request_body/content/application_x_www_form_urlencoded/schema.py @@ -71,10 +71,34 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - param: typing.Union[Schema_.Properties.Param, str], - param2: typing.Union[Schema_.Properties.Param2, str], + param: typing.Union[ + Schema_.Properties.Param[str], + str + ], + param2: typing.Union[ + Schema_.Properties.Param2[str], + str + ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_patch/patch/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_patch/patch/operation.py index 547cb068f32..2462b3f0e68 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_patch/patch/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_patch/patch/operation.py @@ -28,84 +28,48 @@ class BaseApi(api_client.Api): @typing.overload def _json_patch( self, - content_type: typing_extensions.Literal["application/json-patch+json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json-patch+json"].schema, schemas.Unset, list, tuple ] = schemas.unset, + content_type: typing_extensions.Literal["application/json-patch+json"] = "application/json-patch+json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _json_patch( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json-patch+json"].schema, - schemas.Unset, - list, - tuple - ] = schemas.unset, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _json_patch( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json-patch+json"].schema, schemas.Unset, list, tuple ] = schemas.unset, + content_type: typing_extensions.Literal["application/json-patch+json"] = "application/json-patch+json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _json_patch( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json-patch+json"].schema, - schemas.Unset, - list, - tuple - ] = schemas.unset, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _json_patch( self, - content_type: str = 'application/json-patch+json', body: typing.Union[ request_body.RequestBody.content["application/json-patch+json"].schema, schemas.Unset, list, tuple ] = schemas.unset, + content_type: typing_extensions.Literal["application/json-patch+json"] = "application/json-patch+json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ json patch @@ -143,9 +107,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_patch/patch/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_patch/patch/request_body/__init__.py index 487e157b56f..ccf58027de1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_patch/patch/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_patch/patch/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonPatchjsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_patchjson_schema.Schema] = application_json_patchjson_schema.Schema + schema: typing_extensions.TypeAlias = application_json_patchjson_schema.Schema[tuple] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/operation.py index eed836328ec..e95a86e0cc6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/operation.py @@ -32,7 +32,6 @@ class BaseApi(api_client.Api): @typing.overload def _json_with_charset( self, - content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json; charset=utf-8"].schema, schemas.Unset, @@ -53,50 +52,17 @@ def _json_with_charset( io.FileIO, io.BufferedReader ] = schemas.unset, + content_type: typing_extensions.Literal["application/json; charset=utf-8"] = "application/json; charset=utf-8", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _json_with_charset( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json; charset=utf-8"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _json_with_charset( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json; charset=utf-8"].schema, schemas.Unset, @@ -117,49 +83,16 @@ def _json_with_charset( io.FileIO, io.BufferedReader ] = schemas.unset, + content_type: typing_extensions.Literal["application/json; charset=utf-8"] = "application/json; charset=utf-8", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _json_with_charset( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json; charset=utf-8"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _json_with_charset( self, - content_type: str = 'application/json; charset=utf-8', body: typing.Union[ request_body.RequestBody.content["application/json; charset=utf-8"].schema, schemas.Unset, @@ -180,11 +113,12 @@ def _json_with_charset( io.FileIO, io.BufferedReader ] = schemas.unset, + content_type: typing_extensions.Literal["application/json; charset=utf-8"] = "application/json; charset=utf-8", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ json with charset tx and rx @@ -222,9 +156,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/__init__.py index 6df727b9ae4..434e87b1936 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_json_with_charset/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonCharsetutf8MediaType(api_client.MediaType): - schema: typing.Type[application_json_charsetutf8_schema.Schema] = application_json_charsetutf8_schema.Schema + schema: typing_extensions.TypeAlias = application_json_charsetutf8_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/operation.py index 73573f60624..25118a148c5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_response_bodies/get/operation.py @@ -40,7 +40,7 @@ def _multiple_response_bodies( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> typing.Union[ response_200.ResponseFor200.response_cls, response_202.ResponseFor202.response_cls, @@ -49,34 +49,20 @@ def _multiple_response_bodies( @typing.overload def _multiple_response_bodies( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _multiple_response_bodies( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - response_202.ResponseFor202.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _multiple_response_bodies( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ multiple responses have response bodies @@ -105,10 +91,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '202', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/operation.py index 67323dadb5d..fd2ae7f5ffc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_multiple_securities/get/operation.py @@ -47,34 +47,20 @@ def _multiple_securities( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _multiple_securities( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _multiple_securities( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _multiple_securities( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, @@ -82,7 +68,7 @@ def _multiple_securities( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ multiple security requirements @@ -117,9 +103,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/operation.py index 059f502740f..8b05fbd272a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/operation.py @@ -51,43 +51,30 @@ class BaseApi(api_client.Api): @typing.overload def _object_in_query( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _object_in_query( self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _object_in_query( - self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _object_in_query( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ user list @@ -119,9 +106,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py index 3cd3d8b44be..87202840d8b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_obj_in_query/get/parameters/parameter_0/schema.py @@ -53,9 +53,31 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - keyword: typing.Union[Schema_.Properties.Keyword, str, schemas.Unset] = schemas.unset, + keyword: typing.Union[ + Schema_.Properties.Keyword[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py index 0dae5a4086e..4632837d033 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/operation.py @@ -175,7 +175,7 @@ class BaseApi(api_client.Api): @typing.overload def _parameter_collisions( self, - content_type: typing_extensions.Literal["application/json"] = ..., + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -196,21 +196,21 @@ def _parameter_collisions( io.FileIO, io.BufferedReader ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - path_params: RequestPathParameters.Params = frozendict.frozendict(), - cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, + header_params: typing.Optional[RequestHeaderParameters.Params] = None, + cookie_params: typing.Optional[RequestCookieParameters.Params] = None, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _parameter_collisions( self, - content_type: str = ..., + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -231,94 +231,20 @@ def _parameter_collisions( io.FileIO, io.BufferedReader ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - path_params: RequestPathParameters.Params = frozendict.frozendict(), - cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _parameter_collisions( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - path_params: RequestPathParameters.Params = frozendict.frozendict(), - cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, + header_params: typing.Optional[RequestHeaderParameters.Params] = None, + cookie_params: typing.Optional[RequestCookieParameters.Params] = None, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _parameter_collisions( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - path_params: RequestPathParameters.Params = frozendict.frozendict(), - cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _parameter_collisions( self, - content_type: str = 'application/json', + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -339,15 +265,15 @@ def _parameter_collisions( io.FileIO, io.BufferedReader ] = schemas.unset, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - path_params: RequestPathParameters.Params = frozendict.frozendict(), - cookie_params: RequestCookieParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, + header_params: typing.Optional[RequestHeaderParameters.Params] = None, + cookie_params: typing.Optional[RequestCookieParameters.Params] = None, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ parameter collision case @@ -399,9 +325,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py index 34e8a298aef..4bc86290698 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_parameter_collisions1_abab_self_ab/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/operation.py index c7c21ef61ad..6fc2ab9e919 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/operation.py @@ -61,99 +61,57 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file_with_required_file( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _upload_file_with_required_file( self, - content_type: str = ..., + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _upload_file_with_required_file( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _upload_file_with_required_file( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _upload_file_with_required_file( self, - content_type: str = 'multipart/form-data', + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ uploads an image (required) @@ -202,9 +160,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py index 47e4b1e5cc8..43d97dad253 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class MultipartFormDataMediaType(api_client.MediaType): - schema: typing.Type[multipart_form_data_schema.Schema] = multipart_form_data_schema.Schema + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py index 6bc1efd42e5..1875a8012a6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post/request_body/content/multipart_form_data/schema.py @@ -66,10 +66,37 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - requiredFile: typing.Union[Schema_.Properties.RequiredFile, bytes, io.FileIO, io.BufferedReader], - additionalMetadata: typing.Union[Schema_.Properties.AdditionalMetadata, str, schemas.Unset] = schemas.unset, + requiredFile: typing.Union[ + Schema_.Properties.RequiredFile[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ], + additionalMetadata: typing.Union[ + Schema_.Properties.AdditionalMetadata[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/operation.py index d8f705e35e3..a9cd7937062 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_query_param_with_json_content_type/get/operation.py @@ -55,47 +55,33 @@ class BaseApi(api_client.Api): @typing.overload def _query_param_with_json_content_type( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _query_param_with_json_content_type( self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _query_param_with_json_content_type( - self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _query_param_with_json_content_type( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ query param with json content-type @@ -129,9 +115,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_redirection/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_redirection/get/operation.py index 1aa33a24cef..7d0f553590a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_redirection/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_redirection/get/operation.py @@ -42,7 +42,7 @@ def _redirection( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> typing.Union[ response_3xx.ResponseFor3XX.response_cls, response_303.ResponseFor303.response_cls, @@ -51,31 +51,18 @@ def _redirection( @typing.overload def _redirection( self, - skip_deserialization: typing_extensions.Literal[True], server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _redirection( - self, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_3xx.ResponseFor3XX.response_cls, - response_303.ResponseFor303.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _redirection( self, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ operation with redirection responses @@ -103,9 +90,12 @@ class instances status = str(raw_response.status) ranged_response_status_code = status[0] if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '303', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) elif ranged_response_status_code in _ranged_status_code_to_response: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_ref_obj_in_query/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_ref_obj_in_query/get/operation.py index 8e33d614234..14db5df1c17 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_ref_obj_in_query/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_ref_obj_in_query/get/operation.py @@ -51,43 +51,30 @@ class BaseApi(api_client.Api): @typing.overload def _ref_object_in_query( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _ref_object_in_query( self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _ref_object_in_query( - self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _ref_object_in_query( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: typing.Optional[RequestQueryParameters.Params] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ user list @@ -119,9 +106,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_array_of_enums/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_array_of_enums/post/operation.py index 33f9c89b49e..6bc66e6bf2d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_array_of_enums/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_array_of_enums/post/operation.py @@ -32,89 +32,51 @@ class BaseApi(api_client.Api): @typing.overload def _array_of_enums( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, list, tuple ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _array_of_enums( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - list, - tuple - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _array_of_enums( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, list, tuple ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _array_of_enums( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - list, - tuple - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _array_of_enums( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, list, tuple ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Array of Enums @@ -152,9 +114,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/__init__.py index 34e8a298aef..95b6338ecac 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_array_of_enums/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[tuple] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_arraymodel/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_arraymodel/post/operation.py index 3d09ed960d4..877913ac4ab 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_arraymodel/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_arraymodel/post/operation.py @@ -32,89 +32,51 @@ class BaseApi(api_client.Api): @typing.overload def _array_model( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, list, tuple ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _array_model( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - list, - tuple - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _array_model( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, list, tuple ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _array_model( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - list, - tuple - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _array_model( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, list, tuple ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -151,9 +113,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_arraymodel/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_arraymodel/post/request_body/__init__.py index 34e8a298aef..95b6338ecac 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_arraymodel/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_arraymodel/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[tuple] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_boolean/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_boolean/post/operation.py index 978c84c3c6d..d58e931ddf3 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_boolean/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_boolean/post/operation.py @@ -32,84 +32,48 @@ class BaseApi(api_client.Api): @typing.overload def _boolean( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, bool ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _boolean( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - bool - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _boolean( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, bool ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _boolean( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - bool - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _boolean( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, bool ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -146,9 +110,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_boolean/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_boolean/post/request_body/__init__.py index 34e8a298aef..ddc40bb1c1b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_boolean/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_boolean/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[schemas.BoolClass] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py index ecf2ed385fb..826fccaaac1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/operation.py @@ -32,7 +32,6 @@ class BaseApi(api_client.Api): @typing.overload def _composed_one_of_different_types( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -53,50 +52,17 @@ def _composed_one_of_different_types( io.FileIO, io.BufferedReader ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _composed_one_of_different_types( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _composed_one_of_different_types( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -117,49 +83,16 @@ def _composed_one_of_different_types( io.FileIO, io.BufferedReader ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _composed_one_of_different_types( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _composed_one_of_different_types( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -180,11 +113,12 @@ def _composed_one_of_different_types( io.FileIO, io.BufferedReader ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -221,9 +155,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py index 34e8a298aef..4bc86290698 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_enum/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_enum/post/operation.py index 35348c3d3d0..293b3b83377 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_enum/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_enum/post/operation.py @@ -32,89 +32,51 @@ class BaseApi(api_client.Api): @typing.overload def _string_enum( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, None, str ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _string_enum( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - None, - str - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _string_enum( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, None, str ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _string_enum( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - None, - str - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _string_enum( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, None, str ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -151,9 +113,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_enum/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_enum/post/request_body/__init__.py index 34e8a298aef..83f7241b2dc 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_enum/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_enum/post/request_body/__init__.py @@ -12,7 +12,10 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + schemas.NoneClass, + str + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_mammal/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_mammal/post/operation.py index a6d0e1d9b19..a7e6b0f8ea2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_mammal/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_mammal/post/operation.py @@ -51,12 +51,12 @@ def _mammal( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -64,122 +64,58 @@ def _mammal( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _mammal( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.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 = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _mammal( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _mammal( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict, - str, - datetime.date, - datetime.datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader + dict, + frozendict.frozendict, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -216,9 +152,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_mammal/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_mammal/post/request_body/__init__.py index e3c1b3362f1..964f635c0f0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_mammal/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_mammal/post/request_body/__init__.py @@ -12,7 +12,16 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[typing.Union[ + frozendict.frozendict, + str, + decimal.Decimal, + schemas.BoolClass, + schemas.NoneClass, + tuple, + bytes, + schemas.FileIO + ]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_number/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_number/post/operation.py index 86c87ba8089..c3d30a24d65 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_number/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_number/post/operation.py @@ -32,7 +32,6 @@ class BaseApi(api_client.Api): @typing.overload def _number_with_validations( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -40,37 +39,17 @@ def _number_with_validations( int, float ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _number_with_validations( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - decimal.Decimal, - int, - float - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _number_with_validations( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -78,36 +57,16 @@ def _number_with_validations( int, float ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _number_with_validations( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - decimal.Decimal, - int, - float - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _number_with_validations( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, @@ -115,11 +74,12 @@ def _number_with_validations( int, float ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -156,9 +116,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_number/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_number/post/request_body/__init__.py index 34e8a298aef..2f09127776b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_number/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_number/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[decimal.Decimal] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/operation.py index 0b72426e295..e92c533e62c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/operation.py @@ -32,89 +32,51 @@ class BaseApi(api_client.Api): @typing.overload def _object_model_with_ref_props( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _object_model_with_ref_props( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _object_model_with_ref_props( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _object_model_with_ref_props( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _object_model_with_ref_props( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -151,9 +113,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py index 34e8a298aef..e296fe56410 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_object_model_with_ref_props/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_string/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_string/post/operation.py index 10e7063e93f..c0161731439 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_string/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_string/post/operation.py @@ -32,84 +32,48 @@ class BaseApi(api_client.Api): @typing.overload def _string( self, - content_type: typing_extensions.Literal["application/json"] = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, str ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _string( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - str - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _string( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, str ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _string( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - schemas.Unset, - str - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _string( self, - content_type: str = 'application/json', body: typing.Union[ request_body.RequestBody.content["application/json"].schema, schemas.Unset, str ] = schemas.unset, + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -146,9 +110,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_string/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_string/post/request_body/__init__.py index 34e8a298aef..22e647c3bb1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_string/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_refs_string/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[str] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_response_without_schema/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_response_without_schema/get/operation.py index 5d2772a11de..2abde368c49 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_response_without_schema/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_response_without_schema/get/operation.py @@ -36,39 +36,26 @@ def _response_without_schema( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _response_without_schema( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _response_without_schema( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _response_without_schema( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ receives a response without schema @@ -97,9 +84,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/operation.py index ec4445fd7c3..ade48d2c011 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/operation.py @@ -68,43 +68,30 @@ class BaseApi(api_client.Api): @typing.overload def _query_parameter_collection_format( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _query_parameter_collection_format( self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _query_parameter_collection_format( - self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _query_parameter_collection_format( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but @@ -135,9 +122,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py index 3ddc8344c36..da15d120e4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_0/schema.py @@ -22,13 +22,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py index 3ddc8344c36..da15d120e4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_1/schema.py @@ -22,13 +22,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py index 3ddc8344c36..da15d120e4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_2/schema.py @@ -22,13 +22,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py index 3ddc8344c36..da15d120e4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_3/schema.py @@ -22,13 +22,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py index 3ddc8344c36..da15d120e4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_test_query_paramters/put/parameters/parameter_4/schema.py @@ -22,13 +22,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/operation.py index d2f695b05bb..2be53ad7f2b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/operation.py @@ -38,12 +38,12 @@ def _upload_download_file( io.FileIO, io.BufferedReader ], - content_type: typing_extensions.Literal["application/octet-stream"] = ..., + content_type: typing_extensions.Literal["application/octet-stream"] = "application/octet-stream", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -51,70 +51,32 @@ def _upload_download_file( self, body: typing.Union[ request_body.RequestBody.content["application/octet-stream"].schema, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _upload_download_file( - self, - body: typing.Union[ - request_body.RequestBody.content["application/octet-stream"].schema, - bytes, - io.FileIO, - io.BufferedReader + bytes, + io.FileIO, + io.BufferedReader ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/octet-stream"] = "application/octet-stream", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _upload_download_file( self, body: typing.Union[ request_body.RequestBody.content["application/octet-stream"].schema, - bytes, - io.FileIO, - io.BufferedReader - ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_download_file( - self, - body: typing.Union[ - request_body.RequestBody.content["application/octet-stream"].schema, - bytes, - io.FileIO, - io.BufferedReader + bytes, + io.FileIO, + io.BufferedReader ], - content_type: str = 'application/octet-stream', + content_type: typing_extensions.Literal["application/octet-stream"] = "application/octet-stream", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ uploads a file and downloads a file using application/octet-stream @@ -152,9 +114,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/__init__.py index e8c4a03910a..87ef8418e2f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_download_file/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationOctetStreamMediaType(api_client.MediaType): - schema: typing.Type[application_octet_stream_schema.Schema] = application_octet_stream_schema.Schema + schema: typing_extensions.TypeAlias = application_octet_stream_schema.Schema[typing.Union[bytes, schemas.FileIO]] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/operation.py index 3030be9c87b..082715f1370 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/operation.py @@ -32,89 +32,51 @@ class BaseApi(api_client.Api): @typing.overload def _upload_file( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _upload_file( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _upload_file( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _upload_file( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _upload_file( self, - content_type: str = 'multipart/form-data', body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ uploads a file using multipart/form-data @@ -152,9 +114,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/__init__.py index 47e4b1e5cc8..43d97dad253 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class MultipartFormDataMediaType(api_client.MediaType): - schema: typing.Type[multipart_form_data_schema.Schema] = multipart_form_data_schema.Schema + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py index 8fb6efacb46..9f28a0fca8d 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_file/post/request_body/content/multipart_form_data/schema.py @@ -66,10 +66,37 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - file: typing.Union[Schema_.Properties.File, bytes, io.FileIO, io.BufferedReader], - additionalMetadata: typing.Union[Schema_.Properties.AdditionalMetadata, str, schemas.Unset] = schemas.unset, + file: typing.Union[ + Schema_.Properties.File[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ], + additionalMetadata: typing.Union[ + Schema_.Properties.AdditionalMetadata[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/operation.py index 3362cafbf7d..e6f22f77492 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/operation.py @@ -32,89 +32,51 @@ class BaseApi(api_client.Api): @typing.overload def _upload_files( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _upload_files( self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _upload_files( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _upload_files( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _upload_files( self, - content_type: str = 'multipart/form-data', body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ uploads files using multipart/form-data @@ -152,9 +114,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/__init__.py index 47e4b1e5cc8..43d97dad253 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class MultipartFormDataMediaType(api_client.MediaType): - schema: typing.Type[multipart_form_data_schema.Schema] = multipart_form_data_schema.Schema + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py index c03096d4be9..cbc589a3c57 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_upload_files/post/request_body/content/multipart_form_data/schema.py @@ -33,13 +33,13 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, bytes, io.FileIO, io.BufferedReader], ... - ], - typing.List[ - typing.Union[Schema_.Items, bytes, io.FileIO, io.BufferedReader] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[typing.Union[bytes, schemas.FileIO]], + bytes, + io.FileIO, + io.BufferedReader + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema.Schema_.Properties.Files[tuple]: @@ -88,9 +88,32 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - files: typing.Union[Schema_.Properties.Files, list, tuple, schemas.Unset] = schemas.unset, + files: typing.Union[ + Schema_.Properties.Files[tuple], + schemas.Unset, + list, + tuple + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/operation.py index 97542554e96..2f67ad7db7e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/fake_wild_card_responses/get/operation.py @@ -59,7 +59,7 @@ def _wild_card_responses( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> typing.Union[ response_200.ResponseFor200.response_cls, response_2xx.ResponseFor2XX.response_cls, @@ -69,35 +69,20 @@ def _wild_card_responses( @typing.overload def _wild_card_responses( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _wild_card_responses( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - response_2xx.ResponseFor2XX.response_cls, - response_3xx.ResponseFor3XX.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _wild_card_responses( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ operation with wildcard responses @@ -127,9 +112,12 @@ class instances status = str(raw_response.status) ranged_response_status_code = status[0] if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) elif ranged_response_status_code in _ranged_status_code_to_response: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/operation.py index 1afeb7a433b..1351fa4dbca 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/operation.py @@ -27,39 +27,26 @@ def _foo_get( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_default.Default.response_cls: ... @typing.overload def _foo_get( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _foo_get( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_default.Default.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _foo_get( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ :param skip_deserialization: If true then api_response.response will be set but diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py index a6ce0421bfd..eacd76cfd2f 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/foo/get/responses/response_default/content/application_json/schema.py @@ -56,9 +56,32 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - string: typing.Union['foo.Foo', dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + string: typing.Union[ + foo.Foo[frozendict.frozendict], + schemas.Unset, + dict, + frozendict.frozendict + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet/post/operation.py index edfba94b0cd..aa6d62c450b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet/post/operation.py @@ -46,31 +46,19 @@ def _add_pet( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: typing_extensions.Literal["application/json"] = ..., - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - @typing.overload - def _add_pet( - self, - body: typing.Union[ request_body.RequestBody.content["application/xml"].schema, dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/xml"], + content_type: typing_extensions.Literal[ + "application/json", + "application/xml", + ] = "application/json", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -82,52 +70,17 @@ def _add_pet( dict, frozendict.frozendict ], - content_type: str = ..., - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _add_pet( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - request_body.RequestBody.content["application/xml"].schema, - dict, - frozendict.frozendict - ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal[ + "application/json", + "application/xml", + ] = "application/json", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _add_pet( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - request_body.RequestBody.content["application/xml"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _add_pet( self, body: typing.Union[ @@ -136,12 +89,15 @@ def _add_pet( dict, frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal[ + "application/json", + "application/xml", + ] = "application/json", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Add a new pet to the store @@ -185,10 +141,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '405', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet/put/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet/put/operation.py index 6e53dca1663..f30c288c25e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet/put/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet/put/operation.py @@ -47,30 +47,19 @@ def _update_pet( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: typing_extensions.Literal["application/json"] = ..., - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet( - self, - body: typing.Union[ request_body.RequestBody.content["application/xml"].schema, dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/xml"], + content_type: typing_extensions.Literal[ + "application/json", + "application/xml", + ] = "application/json", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> api_response.ApiResponseWithoutDeserialization: ... @typing.overload def _update_pet( @@ -81,50 +70,17 @@ def _update_pet( dict, frozendict.frozendict ], - content_type: str = ..., + content_type: typing_extensions.Literal[ + "application/json", + "application/xml", + ] = "application/json", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - request_body.RequestBody.content["application/xml"].schema, - dict, - frozendict.frozendict - ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - request_body.RequestBody.content["application/xml"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _update_pet( self, body: typing.Union[ @@ -133,12 +89,15 @@ def _update_pet( dict, frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal[ + "application/json", + "application/xml", + ] = "application/json", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Update an existing pet @@ -182,11 +141,14 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '400', '404', '405', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/operation.py index ed078366472..0751072dff2 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/operation.py @@ -72,51 +72,36 @@ class BaseApi(api_client.Api): @typing.overload def _find_pets_by_status( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _find_pets_by_status( self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _find_pets_by_status( - self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _find_pets_by_status( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Finds Pets by status @@ -156,10 +141,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '400', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py index 3ec4445ae6f..f5d206ef46c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_status/get/parameters/parameter_0/schema.py @@ -50,13 +50,11 @@ def SOLD(cls): def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/operation.py index f53771c6922..e79b88d2e14 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/operation.py @@ -65,47 +65,33 @@ class BaseApi(api_client.Api): @typing.overload def _find_pets_by_tags( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _find_pets_by_tags( self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _find_pets_by_tags( - self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _find_pets_by_tags( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Finds Pets by tags @@ -143,10 +129,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '400', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py index 3ddc8344c36..da15d120e4a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_find_by_tags/get/parameters/parameter_0/schema.py @@ -22,13 +22,11 @@ class Schema_: def __new__( cls, - arg_: typing.Union[ - typing.Tuple[ - typing.Union[Schema_.Items, str], ... - ], - typing.List[ - typing.Union[Schema_.Items, str] - ], + arg_: typing.Sequence[ + typing.Union[ + Schema_.Items[str], + str + ] ], configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, ) -> Schema[tuple]: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/operation.py index 277daef115a..70a0446bd7c 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/delete/operation.py @@ -86,49 +86,35 @@ class BaseApi(api_client.Api): @typing.overload def _delete_pet( self, - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, + header_params: typing.Optional[RequestHeaderParameters.Params] = None, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> api_response.ApiResponseWithoutDeserialization: ... @typing.overload def _delete_pet( self, - skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, + header_params: typing.Optional[RequestHeaderParameters.Params] = None, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_pet( - self, - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - path_params: RequestPathParameters.Params = frozendict.frozendict(), - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _delete_pet( self, - header_params: RequestHeaderParameters.Params = frozendict.frozendict(), - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, + header_params: typing.Optional[RequestHeaderParameters.Params] = None, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Deletes a pet @@ -172,9 +158,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '400', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/operation.py index e56b601332a..7323ca773b4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/get/operation.py @@ -69,51 +69,36 @@ class BaseApi(api_client.Api): @typing.overload def _get_pet_by_id( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _get_pet_by_id( self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _get_pet_by_id( - self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _get_pet_by_id( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Find pet by ID @@ -153,11 +138,14 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '400', '404', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/operation.py index 3fa634eb4cc..79619d3548a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/operation.py @@ -61,91 +61,53 @@ class BaseApi(api_client.Api): @typing.overload def _update_pet_with_form( self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> api_response.ApiResponseWithoutDeserialization: ... @typing.overload def _update_pet_with_form( self, - content_type: str = ..., + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_with_form( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet_with_form( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _update_pet_with_form( self, - content_type: str = 'application/x-www-form-urlencoded', + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["application/x-www-form-urlencoded"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = "application/x-www-form-urlencoded", security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Updates a pet in the store with form data @@ -194,9 +156,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '405', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/__init__.py index 92804e6d87c..741380d6d4e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationXWwwFormUrlencodedMediaType(api_client.MediaType): - schema: typing.Type[application_x_www_form_urlencoded_schema.Schema] = application_x_www_form_urlencoded_schema.Schema + schema: typing_extensions.TypeAlias = application_x_www_form_urlencoded_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py index 692767cedb5..48f30d5e620 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id/post/request_body/content/application_x_www_form_urlencoded/schema.py @@ -59,10 +59,36 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - name: typing.Union[Schema_.Properties.Name, str, schemas.Unset] = schemas.unset, - status: typing.Union[Schema_.Properties.Status, str, schemas.Unset] = schemas.unset, + name: typing.Union[ + Schema_.Properties.Name[str], + schemas.Unset, + str + ] = schemas.unset, + status: typing.Union[ + Schema_.Properties.Status[str], + schemas.Unset, + str + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/operation.py index 9d9898a764e..dc527e81079 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/operation.py @@ -61,99 +61,57 @@ class BaseApi(api_client.Api): @typing.overload def _upload_image( self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _upload_image( self, - content_type: str = ..., + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _upload_image( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _upload_image( - self, - content_type: str = ..., - body: typing.Union[ - request_body.RequestBody.content["multipart/form-data"].schema, - schemas.Unset, - dict, - frozendict.frozendict - ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _upload_image( self, - content_type: str = 'multipart/form-data', + path_params: RequestPathParameters.Params, body: typing.Union[ request_body.RequestBody.content["multipart/form-data"].schema, schemas.Unset, dict, frozendict.frozendict ] = schemas.unset, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + content_type: typing_extensions.Literal["multipart/form-data"] = "multipart/form-data", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ uploads an image @@ -202,9 +160,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/__init__.py index 47e4b1e5cc8..43d97dad253 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class MultipartFormDataMediaType(api_client.MediaType): - schema: typing.Type[multipart_form_data_schema.Schema] = multipart_form_data_schema.Schema + schema: typing_extensions.TypeAlias = multipart_form_data_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py index 62f70033674..16f492dd51a 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/pet_pet_id_upload_image/post/request_body/content/multipart_form_data/schema.py @@ -59,10 +59,38 @@ def __getitem__( def __new__( cls, *args_: typing.Union[dict, frozendict.frozendict], - additionalMetadata: typing.Union[Schema_.Properties.AdditionalMetadata, str, schemas.Unset] = schemas.unset, - file: typing.Union[Schema_.Properties.File, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + additionalMetadata: typing.Union[ + Schema_.Properties.AdditionalMetadata[str], + schemas.Unset, + str + ] = schemas.unset, + file: typing.Union[ + Schema_.Properties.File[typing.Union[bytes, schemas.FileIO]], + schemas.Unset, + bytes, + io.FileIO, + io.BufferedReader + ] = schemas.unset, configuration_: typing.Optional[schemas.schema_configuration.SchemaConfiguration] = None, - **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader, schemas.Schema], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + datetime.date, + datetime.datetime, + uuid.UUID, + bool, + None, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Schema + ], ) -> Schema[frozendict.frozendict]: inst = super().__new__( cls, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/solidus/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/solidus/get/operation.py index 178407ccc63..61971a70dfa 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/solidus/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/solidus/get/operation.py @@ -30,36 +30,24 @@ def _slash_route( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _slash_route( self, - skip_deserialization: typing_extensions.Literal[True], server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _slash_route( - self, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _slash_route( self, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ slash route @@ -86,9 +74,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_inventory/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_inventory/get/operation.py index c2da18fe655..0802b6045d5 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_inventory/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_inventory/get/operation.py @@ -41,34 +41,20 @@ def _get_inventory( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _get_inventory( self, - skip_deserialization: typing_extensions.Literal[True], accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, security_index: typing.Optional[int] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _get_inventory( - self, - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - security_index: typing.Optional[int] = None, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _get_inventory( self, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, @@ -76,7 +62,7 @@ def _get_inventory( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Returns pet inventories by status @@ -111,9 +97,12 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order/post/operation.py index 9b49e297331..dde5c2748f4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order/post/operation.py @@ -43,12 +43,12 @@ def _place_order( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload @@ -56,66 +56,30 @@ def _place_order( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_200.ResponseFor200.response_cls: ... - - - @typing.overload - def _place_order( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _place_order( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _place_order( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Place an order for a pet @@ -153,10 +117,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '400', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order/post/request_body/__init__.py index e3c1b3362f1..ce6f2e055f9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/operation.py index 7b0c1b22e50..73b0bbcecee 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/delete/operation.py @@ -56,41 +56,29 @@ class BaseApi(api_client.Api): @typing.overload def _delete_order( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> api_response.ApiResponseWithoutDeserialization: ... @typing.overload def _delete_order( self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_order( - self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _delete_order( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Delete purchase order by ID @@ -122,10 +110,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '400', '404', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/operation.py index 3e659770d98..950f1334d6b 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/store_order_order_id/get/operation.py @@ -64,47 +64,33 @@ class BaseApi(api_client.Api): @typing.overload def _get_order_by_id( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _get_order_by_id( self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _get_order_by_id( - self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _get_order_by_id( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: RequestPathParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Find purchase order by ID @@ -138,11 +124,14 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '400', '404', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user/post/operation.py index 696ea6cc9b2..9fa9ec6c7c0 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user/post/operation.py @@ -25,11 +25,11 @@ def _create_user( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_default.Default.response_cls: ... @typing.overload @@ -37,62 +37,28 @@ def _create_user( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_default.Default.response_cls: ... - - - @typing.overload - def _create_user( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _create_user( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_default.Default.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _create_user( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Create user diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user/post/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user/post/request_body/__init__.py index e3c1b3362f1..ce6f2e055f9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user/post/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user/post/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_create_with_array/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_create_with_array/post/operation.py index dc9d5a54239..034e223a7e1 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_create_with_array/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_create_with_array/post/operation.py @@ -25,11 +25,11 @@ def _create_users_with_array_input( list, tuple ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_default.Default.response_cls: ... @typing.overload @@ -40,47 +40,13 @@ def _create_users_with_array_input( list, tuple ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_default.Default.response_cls: ... - - - @typing.overload - def _create_users_with_array_input( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _create_users_with_array_input( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_default.Default.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _create_users_with_array_input( self, body: typing.Union[ @@ -88,11 +54,11 @@ def _create_users_with_array_input( list, tuple ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Creates list of users with given input array diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_create_with_list/post/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_create_with_list/post/operation.py index fec702a5223..2f76a72b8f4 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_create_with_list/post/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_create_with_list/post/operation.py @@ -25,11 +25,11 @@ def _create_users_with_list_input( list, tuple ], - content_type: typing_extensions.Literal["application/json"] = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_default.Default.response_cls: ... @typing.overload @@ -40,47 +40,13 @@ def _create_users_with_list_input( list, tuple ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> response_default.Default.response_cls: ... - - - @typing.overload - def _create_users_with_list_input( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _create_users_with_list_input( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - list, - tuple - ], - content_type: str = ..., - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_default.Default.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _create_users_with_list_input( self, body: typing.Union[ @@ -88,11 +54,11 @@ def _create_users_with_list_input( list, tuple ], - content_type: str = 'application/json', + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Creates list of users with given input array diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/operation.py index de3033bf65b..b088ca03dce 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_login/get/operation.py @@ -66,47 +66,33 @@ class BaseApi(api_client.Api): @typing.overload def _login_user( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _login_user( self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _login_user( - self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _login_user( self, - query_params: RequestQueryParameters.Params = frozendict.frozendict(), + query_params: RequestQueryParameters.Params, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Logs user into the system @@ -140,10 +126,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '400', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_logout/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_logout/get/operation.py index dee1dec090c..50731ede16e 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_logout/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_logout/get/operation.py @@ -22,36 +22,24 @@ def _logout_user( server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_default.Default.response_cls: ... @typing.overload def _logout_user( self, - skip_deserialization: typing_extensions.Literal[True], server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _logout_user( - self, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_default.Default.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _logout_user( self, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Logs out current logged in user session diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/delete/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/delete/operation.py index b08cd697cda..2efd59aabe6 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/delete/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/delete/operation.py @@ -56,43 +56,30 @@ class BaseApi(api_client.Api): @typing.overload def _delete_user( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: typing.Optional[RequestPathParameters.Params] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _delete_user( self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: typing.Optional[RequestPathParameters.Params] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_user( - self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _delete_user( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: typing.Optional[RequestPathParameters.Params] = None, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Delete user @@ -124,10 +111,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '404', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/get/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/get/operation.py index d114764b948..e090ae419ee 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/get/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/get/operation.py @@ -64,47 +64,33 @@ class BaseApi(api_client.Api): @typing.overload def _get_user_by_name( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: typing.Optional[RequestPathParameters.Params] = None, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> response_200.ResponseFor200.response_cls: ... @typing.overload def _get_user_by_name( self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: typing.Optional[RequestPathParameters.Params] = None, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload - def _get_user_by_name( - self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), - accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - response_200.ResponseFor200.response_cls, - api_response.ApiResponseWithoutDeserialization, - ]: ... - def _get_user_by_name( self, - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: typing.Optional[RequestPathParameters.Params] = None, accept_content_types: typing.Tuple[str, ...] = _all_accept_content_types, server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Get user by user name @@ -138,11 +124,14 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '200', '400', '404', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/put/operation.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/put/operation.py index b7e9113b544..78f1d80c452 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/put/operation.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/put/operation.py @@ -62,76 +62,42 @@ def _update_user( dict, frozendict.frozendict ], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: typing.Optional[RequestPathParameters.Params] = None, + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[False] = False ) -> api_response.ApiResponseWithoutDeserialization: ... @typing.overload def _update_user( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = ..., - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: typing.Optional[RequestPathParameters.Params] = None, + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., + skip_deserialization: typing_extensions.Literal[True] = ... ) -> api_response.ApiResponseWithoutDeserialization: ... - @typing.overload def _update_user( self, body: typing.Union[ request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - ) -> api_response.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_user( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict - ], - content_type: str = ..., - path_params: RequestPathParameters.Params = frozendict.frozendict(), - server_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_response.ApiResponseWithoutDeserialization, - ]: ... - - def _update_user( - self, - body: typing.Union[ - request_body.RequestBody.content["application/json"].schema, - dict, - frozendict.frozendict + dict, + frozendict.frozendict ], - content_type: str = 'application/json', - path_params: RequestPathParameters.Params = frozendict.frozendict(), + path_params: typing.Optional[RequestPathParameters.Params] = None, + content_type: typing_extensions.Literal["application/json"] = "application/json", server_index: typing.Optional[int] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, - skip_deserialization: bool = False, + skip_deserialization: bool = False ): """ Updated user @@ -174,10 +140,13 @@ class instances else: status = str(raw_response.status) if status in _status_code_to_response: - status: typing_extensions.Literal[ + status = typing.cast( + typing_extensions.Literal[ '400', '404', - ] + ], + status + ) response = _status_code_to_response[status].deserialize( raw_response, self.api_client.schema_configuration) else: diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/put/request_body/__init__.py b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/put/request_body/__init__.py index e3c1b3362f1..ce6f2e055f9 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/put/request_body/__init__.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/paths/user_username/put/request_body/__init__.py @@ -12,7 +12,7 @@ class RequestBody(api_client.RequestBody): class ApplicationJsonMediaType(api_client.MediaType): - schema: typing.Type[application_json_schema.Schema] = application_json_schema.Schema + schema: typing_extensions.TypeAlias = application_json_schema.Schema[frozendict.frozendict] Content = typing_extensions.TypedDict( 'Content', { diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/rest.py b/samples/openapi3/client/petstore/python/src/petstore_api/rest.py index 714d2baa000..0cee4433dd8 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/rest.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/rest.py @@ -14,6 +14,7 @@ import certifi import urllib3 +from urllib3 import fields from urllib3 import exceptions as urllib3_exceptions from urllib3._collections import HTTPHeaderDict @@ -21,6 +22,24 @@ logger = logging.getLogger(__name__) +_TYPE_FIELD_VALUE = typing.Union[str, bytes] + + +class RequestField(fields.RequestField): + def __init__( + self, + name: str, + data: _TYPE_FIELD_VALUE, + filename: typing.Optional[str] = None, + headers: typing.Optional[typing.Mapping[str, typing.Union[str, None]]] = None, + header_formatter: typing.Optional[typing.Callable[[str, _TYPE_FIELD_VALUE], str]] = None, + ): + super().__init__(name, data, filename, headers, header_formatter) # type: ignore + + def __eq__(self, other): + if not isinstance(other, fields.RequestField): + return False + return self.__dict__ == other.__dict__ class RESTClientObject(object): @@ -90,7 +109,7 @@ def request( method: str, url: str, headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, + fields: typing.Optional[typing.Tuple[RequestField, ...]] = None, body: typing.Optional[typing.Union[str, bytes]] = None, stream: bool = False, timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, diff --git a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py index 3039f81e4ec..fba4ffeff18 100644 --- a/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python/src/petstore_api/schemas.py @@ -2104,10 +2104,10 @@ class Schema_: types = {tuple} @classmethod - def from_openapi_data_(cls, arg: typing.List[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): + def from_openapi_data_(cls, arg: typing.Sequence[typing.Any], configuration_: typing.Optional[schema_configuration.SchemaConfiguration] = None): return super().from_openapi_data_(arg, configuration_=configuration_) - def __new__(cls, arg_: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: + def __new__(cls, arg_: typing.Sequence[typing.Any], **kwargs: typing.Optional[schema_configuration.SchemaConfiguration]) -> ListSchema[tuple]: return super().__new__(cls, arg_, **kwargs) diff --git a/samples/openapi3/client/petstore/python/tests_manual/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/__init__.py index e7e18993e5e..aa884c7684f 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/__init__.py +++ b/samples/openapi3/client/petstore/python/tests_manual/__init__.py @@ -1,5 +1,5 @@ import collections -import http +from http import client import json import typing import unittest @@ -7,7 +7,7 @@ import urllib3 from urllib3._collections import HTTPHeaderDict -from petstore_api import api_client +from petstore_api import api_client, rest ParamTestCase = collections.namedtuple('ParamTestCase', 'payload expected_serialization explode', defaults=[False]) @@ -24,7 +24,7 @@ def assert_request_called_with( method: str = 'POST', body: typing.Optional[bytes] = None, content_type: typing.Optional[str] = 'application/json', - fields: typing.Optional[typing.Tuple[api_client.RequestField, ...]] = None, + fields: typing.Optional[typing.Tuple[rest.RequestField, ...]] = None, accept_content_type: typing.Optional[str] = 'application/json', stream: bool = False, ): @@ -88,7 +88,7 @@ def headers_for_content_type(content_type: str) -> typing.Dict[str, str]: @classmethod def response( cls, - body: typing.Union[str, bytes, http.client.HTTPResponse], + body: typing.Union[str, bytes, client.HTTPResponse], status: int = 200, content_type: str = json_content_type, headers: typing.Optional[typing.Dict[str, str]] = None, 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 234ab9a8784..6f9795ef41f 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 @@ -10,7 +10,7 @@ """ from email.mime import multipart from email.mime import nonmultipart -import http +from http import client import io import sys import unittest @@ -19,7 +19,7 @@ import urllib3 import petstore_api -from petstore_api import api_client, schemas, exceptions +from petstore_api import api_client, schemas, exceptions, rest from petstore_api.apis.tags.fake_api import FakeApi # noqa: E501 from petstore_api.rest import RESTClientObject from petstore_api.configurations import api_configuration @@ -230,11 +230,11 @@ def test_missing_or_unset_required_query_parameter(self): from petstore_api.components.schema.user import User user = User({}) # missing required query param - with self.assertRaises(petstore_api.ApiTypeError): + with self.assertRaises(TypeError): self.api.body_with_query_params(body=user) # required query param may not be unset with self.assertRaises(petstore_api.ApiValueError): - self.api.body_with_query_params(body=schemas.unset, query_params=dict(query=schemas.unset)) + self.api.body_with_query_params(body={}, query_params={'query': schemas.unset}) def test_body_with_query_params(self): from petstore_api.components.schema import user @@ -253,7 +253,7 @@ def test_body_with_query_params(self): api_response = self.api.body_with_query_params( body=body, - query_params=dict(query='hi there') + query_params={'query': 'hi there'} ) self.assert_request_called_with( mock_request, @@ -318,15 +318,15 @@ def test_upload_download_file_tx_bytes_and_file(self): self.assertEqual(api_response.body, file_bytes) @staticmethod - def __get_streamable_body(file: io.FileIO): + def __get_streamable_body(file: typing.Union[io.BufferedReader, typing.BinaryIO]) -> client.HTTPResponse: class FileMaker: @staticmethod def makefile(mode: str): return file - streamable_body = http.client.HTTPResponse(sock=FileMaker) + streamable_body = client.HTTPResponse(sock=FileMaker) # type: ignore # todo in the future have tests of chunked encoding and this like # https://github.com/urllib3/urllib3/blob/main/test/test_response.py - streamable_body.chunked = 0 + streamable_body.chunked = False streamable_body.length = 67 # length of file return streamable_body @@ -367,7 +367,7 @@ def test_upload_download_file_rx_file(self): self.assertTrue(isinstance(api_response.body, schemas.FileIO)) self.assertEqual(api_response.body.read(), file_bytes) api_response.body.close() - os.unlink(api_response.body.name) + os.unlink(str(api_response.body.name)) file1 = open(file_path1, "rb") streamable_body = self.__get_streamable_body(file1) @@ -398,10 +398,10 @@ def test_upload_download_file_rx_file(self): self.assertTrue(isinstance(api_response.body, schemas.BinarySchema)) self.assertTrue(isinstance(api_response.body, schemas.FileSchema)) self.assertTrue(isinstance(api_response.body, schemas.FileIO)) - self.assertTrue(api_response.body.name.endswith(saved_file_name)) + self.assertTrue(str(api_response.body.name).endswith(saved_file_name)) self.assertEqual(api_response.body.read(), file_bytes) api_response.body.close() - os.unlink(api_response.body.name) + os.unlink(str(api_response.body.name)) """ when streaming is used and the response contains the content disposition header without a filename @@ -434,10 +434,10 @@ def test_upload_download_file_rx_file(self): self.assertTrue(isinstance(api_response.body, schemas.BinarySchema)) self.assertTrue(isinstance(api_response.body, schemas.FileSchema)) self.assertTrue(isinstance(api_response.body, schemas.FileIO)) - self.assertTrue(api_response.body.name.endswith(expected_filename)) + self.assertTrue(str(api_response.body.name).endswith(expected_filename)) self.assertEqual(api_response.body.read(), file_bytes) api_response.body.close() - os.unlink(api_response.body.name) + os.unlink(str(api_response.body.name)) def test_upload_file(self): """Test case for upload_file @@ -467,7 +467,7 @@ def test_upload_file(self): mock_request, 'http://petstore.swagger.io:80/v2/fake/uploadFile', fields=( - api_client.RequestField( + rest.RequestField( name='file', data=file_bytes, filename=file_name, @@ -496,7 +496,7 @@ def test_upload_file(self): mock_request, 'http://petstore.swagger.io:80/v2/fake/uploadFile', fields=( - api_client.RequestField( + rest.RequestField( name='file', data=file_bytes, headers={ @@ -512,12 +512,10 @@ def test_upload_file(self): # passing in an array of files to when file only allows one # raises an exceptions - try: - file = open(file_path1, "rb") - with self.assertRaises(petstore_api.ApiTypeError): - self.api.upload_file(body={'file': [file]}) - finally: - file.close() + file = open(file_path1, "rb") + with self.assertRaises(petstore_api.ApiTypeError): + self.api.upload_file(body={'file': [file]}) + file.close() # passing in a closed file raises an exception with self.assertRaises(ValueError): @@ -554,7 +552,7 @@ def test_upload_files(self): mock_request, 'http://petstore.swagger.io:80/v2/fake/uploadFiles', fields=( - api_client.RequestField( + rest.RequestField( name='files', data=file_bytes, filename=file_name, @@ -564,7 +562,7 @@ def test_upload_files(self): "Content-Location": None } ), - api_client.RequestField( + rest.RequestField( name='files', data=file_bytes, filename=file_name, @@ -595,7 +593,7 @@ def test_upload_files(self): mock_request, 'http://petstore.swagger.io:80/v2/fake/uploadFiles', fields=( - api_client.RequestField( + rest.RequestField( name='files', data=file_bytes, headers={ @@ -604,7 +602,7 @@ def test_upload_files(self): "Content-Location": None } ), - api_client.RequestField( + rest.RequestField( name='files', data=file_bytes, headers={ @@ -684,7 +682,7 @@ def test_inline_composition(self, mock_request): accept_content_type=content_type, content_type=content_type, fields=( - api_client.RequestField( + rest.RequestField( name='someProp', data=single_char_str, headers={ @@ -782,7 +780,7 @@ def test_delete_endpoint_without_request_body(self): self.json_bytes(body), ) - api_response = self.api.delete_coffee(path_params=dict(id='1')) + api_response = self.api.delete_coffee(path_params={'id': '1'}) self.assert_pool_manager_request_called_with( mock_request, 'http://petstore.swagger.io:80/v2/fake/deleteCoffee/1', diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_request_body.py b/samples/openapi3/client/petstore/python/tests_manual/test_request_body.py index 9c8ce81eece..904616dd30b 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_request_body.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_request_body.py @@ -13,7 +13,7 @@ import json import unittest -from petstore_api import api_client, exceptions, schemas +from petstore_api import api_client, exceptions, schemas, rest ParamTestCase = collections.namedtuple('ParamTestCase', 'payload expected_serialization') @@ -65,49 +65,49 @@ class RequestBody(api_client.RequestBody): serialization, dict( fields=( - api_client.RequestField( + rest.RequestField( name='some_null', data='null', headers={ 'Content-Type': 'application/json', "Content-Disposition": "form-data; name=\"some_null\"", "Content-Location": None }), - api_client.RequestField( + rest.RequestField( name='some_bool', data='true', headers={ 'Content-Type': 'application/json', "Content-Disposition": "form-data; name=\"some_bool\"", "Content-Location": None }), - api_client.RequestField( + rest.RequestField( name='some_str', data='a', headers={ 'Content-Type': 'text/plain', "Content-Disposition": "form-data; name=\"some_str\"", "Content-Location": None }), - api_client.RequestField( + rest.RequestField( name='some_int', data='1', headers={ 'Content-Type': 'application/json', "Content-Disposition": "form-data; name=\"some_int\"", "Content-Location": None }), - api_client.RequestField( + rest.RequestField( name='some_float', data='3.14', headers={ 'Content-Type': 'application/json', "Content-Disposition": "form-data; name=\"some_float\"", "Content-Location": None }), - api_client.RequestField( + rest.RequestField( name='some_list', data='[]', headers={ 'Content-Type': 'application/json', "Content-Disposition": "form-data; name=\"some_list\"", "Content-Location": None }), - api_client.RequestField( + rest.RequestField( name='some_dict', data='{}', headers={ 'Content-Type': 'application/json', "Content-Disposition": "form-data; name=\"some_dict\"", "Content-Location": None }), - api_client.RequestField( + rest.RequestField( name='some_bytes', data=b'abc', headers={ 'Content-Type': 'application/octet-stream', "Content-Disposition": "form-data; name=\"some_bytes\"",